init.c 768 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. #include <linux/device.h>
  7. #include <linux/init.h>
  8. #include <linux/memory.h>
  9. #include <linux/of.h>
  10. #include "base.h"
  11. /**
  12. * driver_init - initialize driver model.
  13. *
  14. * Call the driver model init functions to initialize their
  15. * subsystems. Called early from init/main.c.
  16. */
  17. void __init driver_init(void)
  18. {
  19. /* These are the core pieces */
  20. devtmpfs_init();
  21. devices_init();
  22. buses_init();
  23. classes_init();
  24. firmware_init();
  25. hypervisor_init();
  26. /* These are also core pieces, but must come after the
  27. * core core pieces.
  28. */
  29. of_core_init();
  30. platform_bus_init();
  31. cpu_dev_init();
  32. memory_dev_init();
  33. container_dev_init();
  34. }