xref: /openbmc/u-boot/drivers/ram/ram-uclass.c (revision 88dc4099)
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2015 Google, Inc
4  * Written by Simon Glass <sjg@chromium.org>
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 };
28