mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
Kernel: Renable UHCIController on 64-bit processors
This commit is contained in:
parent
7ba3c22931
commit
0b04363b01
4 changed files with 31 additions and 41 deletions
|
@ -27,18 +27,15 @@
|
|||
|
||||
#include <AK/Platform.h>
|
||||
|
||||
// FIXME: This should not be i386-specific.
|
||||
#if ARCH(I386)
|
||||
#include <Kernel/Debug.h>
|
||||
#include <Kernel/Devices/USB/UHCIController.h>
|
||||
#include <Kernel/Process.h>
|
||||
#include <Kernel/StdLib.h>
|
||||
#include <Kernel/Time/TimeManagement.h>
|
||||
#include <Kernel/VM/AnonymousVMObject.h>
|
||||
#include <Kernel/VM/MemoryManager.h>
|
||||
|
||||
# include <Kernel/Debug.h>
|
||||
# include <Kernel/Devices/USB/UHCIController.h>
|
||||
# include <Kernel/Process.h>
|
||||
# include <Kernel/StdLib.h>
|
||||
# include <Kernel/Time/TimeManagement.h>
|
||||
# include <Kernel/VM/AnonymousVMObject.h>
|
||||
# include <Kernel/VM/MemoryManager.h>
|
||||
|
||||
# define UHCI_ENABLED 1
|
||||
#define UHCI_ENABLED 1
|
||||
static constexpr u8 MAXIMUM_NUMBER_OF_TDS = 128; // Upper pool limit. This consumes the second page we have allocated
|
||||
static constexpr u8 MAXIMUM_NUMBER_OF_QHS = 64;
|
||||
|
||||
|
@ -93,9 +90,9 @@ UHCIController& UHCIController::the()
|
|||
|
||||
UNMAP_AFTER_INIT void UHCIController::detect()
|
||||
{
|
||||
# if !UHCI_ENABLED
|
||||
#if !UHCI_ENABLED
|
||||
return;
|
||||
# endif
|
||||
#endif
|
||||
PCI::enumerate([&](const PCI::Address& address, PCI::ID id) {
|
||||
if (address.is_null())
|
||||
return;
|
||||
|
@ -200,9 +197,9 @@ UNMAP_AFTER_INIT void UHCIController::create_structures()
|
|||
transfer_descriptor->set_isochronous();
|
||||
transfer_descriptor->link_queue_head(m_interrupt_transfer_queue->paddr());
|
||||
|
||||
# if UHCI_VERBOSE_DEBUG
|
||||
#if UHCI_VERBOSE_DEBUG
|
||||
transfer_descriptor->print();
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
m_free_td_pool.resize(MAXIMUM_NUMBER_OF_TDS);
|
||||
|
@ -216,10 +213,10 @@ UNMAP_AFTER_INIT void UHCIController::create_structures()
|
|||
// access the raw descriptor (that we later send to the controller)
|
||||
m_free_td_pool.at(i) = new (placement_addr) Kernel::USB::TransferDescriptor(paddr);
|
||||
|
||||
# if UHCI_VERBOSE_DEBUG
|
||||
#if UHCI_VERBOSE_DEBUG
|
||||
auto transfer_descriptor = m_free_td_pool.at(i);
|
||||
transfer_descriptor->print();
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
if constexpr (UHCI_DEBUG) {
|
||||
|
@ -464,5 +461,3 @@ void UHCIController::handle_irq(const RegisterState&)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue