ram-uclass.c 488 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (C) 2015 Google, Inc
  3. * Written by Simon Glass <sjg@chromium.org>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  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. int ram_get_info(struct udevice *dev, struct ram_info *info)
  14. {
  15. struct ram_ops *ops = ram_get_ops(dev);
  16. if (!ops->get_info)
  17. return -ENOSYS;
  18. return ops->get_info(dev, info);
  19. }
  20. UCLASS_DRIVER(ram) = {
  21. .id = UCLASS_RAM,
  22. .name = "ram",
  23. };