init.c 875 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 <linux/backing-dev.h>
  11. #include "base.h"
  12. /**
  13. * driver_init - initialize driver model.
  14. *
  15. * Call the driver model init functions to initialize their
  16. * subsystems. Called early from init/main.c.
  17. */
  18. void __init driver_init(void)
  19. {
  20. /* These are the core pieces */
  21. bdi_init(&noop_backing_dev_info);
  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. of_core_init();
  32. platform_bus_init();
  33. auxiliary_bus_init();
  34. cpu_dev_init();
  35. memory_dev_init();
  36. node_dev_init();
  37. container_dev_init();
  38. }