blob: 48c0e220acc0a1b8192ca6b523ad35ab7073eba7 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * Copyright (c) 2002-3 Patrick Mochel
3 * Copyright (c) 2002-3 Open Source Development Labs
4 *
5 * This file is released under the GPLv2
Linus Torvalds1da177e2005-04-16 15:20:36 -07006 */
7
8#include <linux/device.h>
9#include <linux/init.h>
Dave Hansen3947be12005-10-29 18:16:54 -070010#include <linux/memory.h>
Sudeep Holla194ec9362015-05-14 15:28:24 +010011#include <linux/of.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070012
Ben Dooksa1bdc7a2005-10-13 17:54:41 +010013#include "base.h"
14
Linus Torvalds1da177e2005-04-16 15:20:36 -070015/**
Greg Kroah-Hartman4a3ad202008-01-24 22:50:12 -080016 * driver_init - initialize driver model.
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 *
Greg Kroah-Hartman4a3ad202008-01-24 22:50:12 -080018 * Call the driver model init functions to initialize their
19 * subsystems. Called early from init/main.c.
Linus Torvalds1da177e2005-04-16 15:20:36 -070020 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070021void __init driver_init(void)
22{
23 /* These are the core pieces */
Kay Sievers2b2af542009-04-30 15:23:42 +020024 devtmpfs_init();
Linus Torvalds1da177e2005-04-16 15:20:36 -070025 devices_init();
26 buses_init();
27 classes_init();
28 firmware_init();
Michael Holzheu40394832006-05-09 12:53:49 +020029 hypervisor_init();
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
31 /* These are also core pieces, but must come after the
32 * core core pieces.
33 */
34 platform_bus_init();
Linus Torvalds1da177e2005-04-16 15:20:36 -070035 cpu_dev_init();
Dave Hansen3947be12005-10-29 18:16:54 -070036 memory_dev_init();
Rafael J. Wysockicaa73ea2013-12-29 15:25:48 +010037 container_dev_init();
Sudeep Holla194ec9362015-05-14 15:28:24 +010038 of_core_init();
Linus Torvalds1da177e2005-04-16 15:20:36 -070039}