blob: a33d583cc4486dd5bcd7e8edc826e8693a6c6add [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Simon Glass3a2f3bd2015-06-23 15:39:04 -06002/*
3 * Copyright (C) 2015 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
Simon Glass3a2f3bd2015-06-23 15:39:04 -06005 */
6
Patrick Delaunay81313352021-04-27 11:02:19 +02007#define LOG_CATEGORY UCLASS_RAM
8
Simon Glass3a2f3bd2015-06-23 15:39:04 -06009#include <ram.h>
10#include <dm.h>
11#include <errno.h>
12#include <dm/lists.h>
13#include <dm/root.h>
14
15int ram_get_info(struct udevice *dev, struct ram_info *info)
16{
17 struct ram_ops *ops = ram_get_ops(dev);
18
19 if (!ops->get_info)
20 return -ENOSYS;
21
22 return ops->get_info(dev, info);
23}
24
25UCLASS_DRIVER(ram) = {
26 .id = UCLASS_RAM,
27 .name = "ram",
28};