mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 02:54:54 +03: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
@ -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…
Reference in New Issue
Block a user