malta-dt.c 849 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (C) 2015 Imagination Technologies
  3. * Author: Paul Burton <paul.burton@imgtec.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the
  7. * Free Software Foundation; either version 2 of the License, or (at your
  8. * option) any later version.
  9. */
  10. #include <linux/clk-provider.h>
  11. #include <linux/init.h>
  12. #include <linux/of_fdt.h>
  13. #include <linux/of_platform.h>
  14. void __init device_tree_init(void)
  15. {
  16. unflatten_and_copy_device_tree();
  17. }
  18. static const struct of_device_id bus_ids[] __initconst = {
  19. { .compatible = "simple-bus", },
  20. { .compatible = "isa", },
  21. {},
  22. };
  23. static int __init publish_devices(void)
  24. {
  25. if (!of_have_populated_dt())
  26. return 0;
  27. return of_platform_bus_probe(NULL, bus_ids, NULL);
  28. }
  29. device_initcall(publish_devices);