167760Smsmith// SPDX-License-Identifier: GPL-2.0+ 267760Smsmith/* 367760Smsmith * Copyright (C) 2015 Google, Inc 4193750Sjkim * Written by Simon Glass <sjg@chromium.org> 567760Smsmith */ 667760Smsmith 767760Smsmith#define LOG_CATEGORY UCLASS_RAM 867760Smsmith 967760Smsmith#include <common.h> 1067760Smsmith#include <ram.h> 1167760Smsmith#include <dm.h> 1267760Smsmith#include <errno.h> 1367760Smsmith#include <dm/lists.h> 1467760Smsmith#include <dm/root.h> 1567760Smsmith 1667760Smsmithint ram_get_info(struct udevice *dev, struct ram_info *info) 1767760Smsmith{ 1867760Smsmith struct ram_ops *ops = ram_get_ops(dev); 1967760Smsmith 2067760Smsmith if (!ops->get_info) 2167760Smsmith return -ENOSYS; 2267760Smsmith 2367760Smsmith return ops->get_info(dev, info); 2467760Smsmith} 2567760Smsmith 2667760SmsmithUCLASS_DRIVER(ram) = { 2767760Smsmith .id = UCLASS_RAM, 2867760Smsmith .name = "ram", 2967760Smsmith}; 3067760Smsmith