ram-uclass.c 485 B

123456789101112131415161718192021222324252627
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2015 Google, Inc
  4. * Written by Simon Glass <sjg@chromium.org>
  5. */
  6. #include <common.h>
  7. #include <ram.h>
  8. #include <dm.h>
  9. #include <errno.h>
  10. #include <dm/lists.h>
  11. #include <dm/root.h>
  12. int ram_get_info(struct udevice *dev, struct ram_info *info)
  13. {
  14. struct ram_ops *ops = ram_get_ops(dev);
  15. if (!ops->get_info)
  16. return -ENOSYS;
  17. return ops->get_info(dev, info);
  18. }
  19. UCLASS_DRIVER(ram) = {
  20. .id = UCLASS_RAM,
  21. .name = "ram",
  22. };