18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2002-3 Patrick Mochel 48c2ecf20Sopenharmony_ci * Copyright (c) 2002-3 Open Source Development Labs 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <linux/device.h> 88c2ecf20Sopenharmony_ci#include <linux/init.h> 98c2ecf20Sopenharmony_ci#include <linux/memory.h> 108c2ecf20Sopenharmony_ci#include <linux/of.h> 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include "base.h" 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci/** 158c2ecf20Sopenharmony_ci * driver_init - initialize driver model. 168c2ecf20Sopenharmony_ci * 178c2ecf20Sopenharmony_ci * Call the driver model init functions to initialize their 188c2ecf20Sopenharmony_ci * subsystems. Called early from init/main.c. 198c2ecf20Sopenharmony_ci */ 208c2ecf20Sopenharmony_civoid __init driver_init(void) 218c2ecf20Sopenharmony_ci{ 228c2ecf20Sopenharmony_ci /* These are the core pieces */ 238c2ecf20Sopenharmony_ci devtmpfs_init(); 248c2ecf20Sopenharmony_ci devices_init(); 258c2ecf20Sopenharmony_ci buses_init(); 268c2ecf20Sopenharmony_ci classes_init(); 278c2ecf20Sopenharmony_ci firmware_init(); 288c2ecf20Sopenharmony_ci hypervisor_init(); 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci /* These are also core pieces, but must come after the 318c2ecf20Sopenharmony_ci * core core pieces. 328c2ecf20Sopenharmony_ci */ 338c2ecf20Sopenharmony_ci of_core_init(); 348c2ecf20Sopenharmony_ci platform_bus_init(); 358c2ecf20Sopenharmony_ci cpu_dev_init(); 368c2ecf20Sopenharmony_ci memory_dev_init(); 378c2ecf20Sopenharmony_ci container_dev_init(); 388c2ecf20Sopenharmony_ci} 39