Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | 6c51df6 | 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 | 6c51df6 | 2015-06-23 15:39:04 -0600 | [diff] [blame] | 5 | */ |
| 6 | |
Patrick Delaunay | b953ec2 | 2021-04-27 11:02:19 +0200 | [diff] [blame] | 7 | #define LOG_CATEGORY UCLASS_RAM |
| 8 | |
Simon Glass | 6c51df6 | 2015-06-23 15:39:04 -0600 | [diff] [blame] | 9 | #include <common.h> |
| 10 | #include <ram.h> |
| 11 | #include <dm.h> |
| 12 | #include <errno.h> |
| 13 | #include <dm/lists.h> |
| 14 | #include <dm/root.h> |
| 15 | |
| 16 | int ram_get_info(struct udevice *dev, struct ram_info *info) |
| 17 | { |
| 18 | struct ram_ops *ops = ram_get_ops(dev); |
| 19 | |
| 20 | if (!ops->get_info) |
| 21 | return -ENOSYS; |
| 22 | |
| 23 | return ops->get_info(dev, info); |
| 24 | } |
| 25 | |
| 26 | UCLASS_DRIVER(ram) = { |
| 27 | .id = UCLASS_RAM, |
| 28 | .name = "ram", |
| 29 | }; |