init.c 812 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (c) 2002-3 Patrick Mochel
  4. * Copyright (c) 2002-3 Open Source Development Labs
  5. *
  6. * This file is released under the GPLv2
  7. */
  8. #include <linux/device.h>
  9. #include <linux/init.h>
  10. #include <linux/memory.h>
  11. #include <linux/of.h>
  12. #include "base.h"
  13. /**
  14. * driver_init - initialize driver model.
  15. *
  16. * Call the driver model init functions to initialize their
  17. * subsystems. Called early from init/main.c.
  18. */
  19. void __init driver_init(void)
  20. {
  21. /* These are the core pieces */
  22. devtmpfs_init();
  23. devices_init();
  24. buses_init();
  25. classes_init();
  26. firmware_init();
  27. hypervisor_init();
  28. /* These are also core pieces, but must come after the
  29. * core core pieces.
  30. */
  31. platform_bus_init();
  32. cpu_dev_init();
  33. memory_dev_init();
  34. container_dev_init();
  35. of_core_init();
  36. }