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