blob: f4d387fed1efc7f6c9b8cf4cea7107a44564368d [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Simon Glass6c51df62015-06-23 15:39:04 -06002/*
3 * Copyright (C) 2015 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
Simon Glass6c51df62015-06-23 15:39:04 -06005 */
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
14int 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
24UCLASS_DRIVER(ram) = {
25 .id = UCLASS_RAM,
26 .name = "ram",
27};