summaryrefslogtreecommitdiff
path: root/Kernel/init.cpp
diff options
context:
space:
mode:
authorLuke <luke.wilde@live.co.uk>2021-08-08 19:50:20 +0100
committerAndreas Kling <kling@serenityos.org>2021-08-09 21:05:25 +0200
commit7a86a8df903c0efd73241173a00d7abfd1d6451f (patch)
tree440d44554939a7653a97f88cf238f414b47b52a5 /Kernel/init.cpp
parentc5974d3518db2b05eaa5d002516137980a587e36 (diff)
downloadserenity-7a86a8df903c0efd73241173a00d7abfd1d6451f.zip
Kernel/USB: Create controller base class and introduce USBManagement
This removes Pipes dependency on the UHCIController by introducing a controller base class. This will be used to implement other controllers such as OHCI. Additionally, there can be multiple instances of a UHCI controller. For example, multiple UHCI instances can be required for systems with EHCI controllers. EHCI relies on using multiple of either UHCI or OHCI controllers to drive USB 1.x devices. This means UHCIController can no longer be a singleton. Multiple instances of it can now be created and passed to the device and then to the pipe. To handle finding and creating these instances, USBManagement has been introduced. It has the same pattern as the other management classes such as NetworkManagement.
Diffstat (limited to 'Kernel/init.cpp')
-rw-r--r--Kernel/init.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp
index 9895809d24..b0a5b96927 100644
--- a/Kernel/init.cpp
+++ b/Kernel/init.cpp
@@ -13,7 +13,7 @@
#include <Kernel/BootInfo.h>
#include <Kernel/Bus/PCI/Access.h>
#include <Kernel/Bus/PCI/Initializer.h>
-#include <Kernel/Bus/USB/UHCIController.h>
+#include <Kernel/Bus/USB/USBManagement.h>
#include <Kernel/CMOS.h>
#include <Kernel/CommandLine.h>
#include <Kernel/Devices/FullDevice.h>
@@ -300,7 +300,7 @@ void init_stage2(void*)
auto boot_profiling = kernel_command_line().is_boot_profiling_enabled();
- USB::UHCIController::detect();
+ USB::USBManagement::initialize();
BIOSSysFSDirectory::initialize();
ACPI::ACPISysFSDirectory::initialize();