Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <linux/device.h> |
| 9 | #include <linux/init.h> |
Dave Hansen | 3947be1 | 2005-10-29 18:16:54 -0700 | [diff] [blame] | 10 | #include <linux/memory.h> |
Sudeep Holla | 194ec936 | 2015-05-14 15:28:24 +0100 | [diff] [blame] | 11 | #include <linux/of.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | |
Ben Dooks | a1bdc7a | 2005-10-13 17:54:41 +0100 | [diff] [blame] | 13 | #include "base.h" |
| 14 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | /** |
Greg Kroah-Hartman | 4a3ad20 | 2008-01-24 22:50:12 -0800 | [diff] [blame] | 16 | * driver_init - initialize driver model. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | * |
Greg Kroah-Hartman | 4a3ad20 | 2008-01-24 22:50:12 -0800 | [diff] [blame] | 18 | * Call the driver model init functions to initialize their |
| 19 | * subsystems. Called early from init/main.c. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | void __init driver_init(void) |
| 22 | { |
| 23 | /* These are the core pieces */ |
Kay Sievers | 2b2af54 | 2009-04-30 15:23:42 +0200 | [diff] [blame] | 24 | devtmpfs_init(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | devices_init(); |
| 26 | buses_init(); |
| 27 | classes_init(); |
| 28 | firmware_init(); |
Michael Holzheu | 4039483 | 2006-05-09 12:53:49 +0200 | [diff] [blame] | 29 | hypervisor_init(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | |
| 31 | /* These are also core pieces, but must come after the |
| 32 | * core core pieces. |
| 33 | */ |
| 34 | platform_bus_init(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | cpu_dev_init(); |
Dave Hansen | 3947be1 | 2005-10-29 18:16:54 -0700 | [diff] [blame] | 36 | memory_dev_init(); |
Rafael J. Wysocki | caa73ea | 2013-12-29 15:25:48 +0100 | [diff] [blame] | 37 | container_dev_init(); |
Sudeep Holla | 194ec936 | 2015-05-14 15:28:24 +0100 | [diff] [blame] | 38 | of_core_init(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | } |