simple-bus.c 646 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2014 Google, Inc
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <dm.h>
  8. #include <dm/root.h>
  9. DECLARE_GLOBAL_DATA_PTR;
  10. static int simple_bus_post_bind(struct udevice *dev)
  11. {
  12. return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false);
  13. }
  14. UCLASS_DRIVER(simple_bus) = {
  15. .id = UCLASS_SIMPLE_BUS,
  16. .name = "simple_bus",
  17. .post_bind = simple_bus_post_bind,
  18. };
  19. static const struct udevice_id generic_simple_bus_ids[] = {
  20. { .compatible = "simple-bus" },
  21. { }
  22. };
  23. U_BOOT_DRIVER(simple_bus_drv) = {
  24. .name = "generic_simple_bus",
  25. .id = UCLASS_SIMPLE_BUS,
  26. .of_match = generic_simple_bus_ids,
  27. };