mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
Kernel/USB: Start the UHCI controller after resetting it
This commit is contained in:
parent
c8668e9b7c
commit
3f36903201
Notes:
sideshowbarker
2024-07-19 02:54:48 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3f369032013
2 changed files with 13 additions and 0 deletions
|
@ -65,6 +65,7 @@ UHCIController::UHCIController(PCI::Address address, PCI::ID id)
|
|||
klog() << "UHCI: Interrupt line: " << PCI::get_interrupt_line(pci_address());
|
||||
|
||||
reset();
|
||||
start();
|
||||
}
|
||||
|
||||
UHCIController::~UHCIController()
|
||||
|
@ -97,6 +98,17 @@ void UHCIController::stop()
|
|||
}
|
||||
}
|
||||
|
||||
void UHCIController::start()
|
||||
{
|
||||
write_usbcmd(read_usbcmd() | UHCI_USBCMD_RUN);
|
||||
// FIXME: Timeout
|
||||
for (;;) {
|
||||
if (!(read_usbsts() & UHCI_USBSTS_HOST_CONTROLLER_HALTED))
|
||||
break;
|
||||
}
|
||||
klog() << "UHCI: Started!";
|
||||
}
|
||||
|
||||
void UHCIController::handle_irq(const RegisterState&)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ public:
|
|||
|
||||
void reset();
|
||||
void stop();
|
||||
void start();
|
||||
|
||||
private:
|
||||
UHCIController(PCI::Address, PCI::ID);
|
||||
|
|
Loading…
Add table
Reference in a new issue