init.c 768 字节
Newer Older
1
// SPDX-License-Identifier: GPL-2.0
L
Linus Torvalds 已提交
2 3 4 5 6 7 8
/*
 * Copyright (c) 2002-3 Patrick Mochel
 * Copyright (c) 2002-3 Open Source Development Labs
 */

#include <linux/device.h>
#include <linux/init.h>
9
#include <linux/memory.h>
10
#include <linux/of.h>
L
Linus Torvalds 已提交
11

12 13
#include "base.h"

L
Linus Torvalds 已提交
14
/**
15
 * driver_init - initialize driver model.
L
Linus Torvalds 已提交
16
 *
17 18
 * Call the driver model init functions to initialize their
 * subsystems. Called early from init/main.c.
L
Linus Torvalds 已提交
19 20 21 22
 */
void __init driver_init(void)
{
	/* These are the core pieces */
23
	devtmpfs_init();
L
Linus Torvalds 已提交
24 25 26 27
	devices_init();
	buses_init();
	classes_init();
	firmware_init();
28
	hypervisor_init();
L
Linus Torvalds 已提交
29 30 31 32 33 34

	/* These are also core pieces, but must come after the
	 * core core pieces.
	 */
	platform_bus_init();
	cpu_dev_init();
35
	memory_dev_init();
36
	container_dev_init();
37
	of_core_init();
L
Linus Torvalds 已提交
38
}