Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | 3a2f3bd | 2015-06-23 15:39:04 -0600 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 Google, Inc |
| 4 | * Written by Simon Glass <sjg@chromium.org> |
Simon Glass | 3a2f3bd | 2015-06-23 15:39:04 -0600 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <ram.h> |
| 9 | #include <dm.h> |
| 10 | #include <errno.h> |
| 11 | #include <dm/lists.h> |
| 12 | #include <dm/root.h> |
| 13 | |
| 14 | int ram_get_info(struct udevice *dev, struct ram_info *info) |
| 15 | { |
| 16 | struct ram_ops *ops = ram_get_ops(dev); |
| 17 | |
| 18 | if (!ops->get_info) |
| 19 | return -ENOSYS; |
| 20 | |
| 21 | return ops->get_info(dev, info); |
| 22 | } |
| 23 | |
| 24 | UCLASS_DRIVER(ram) = { |
| 25 | .id = UCLASS_RAM, |
| 26 | .name = "ram", |
| 27 | }; |