mirror of
https://github.com/reactos/reactos.git
synced 2024-08-23 19:58:25 +00:00
[USB]
- Merge r55564 and r55567 from usb-bringup-trunk - USB development should now be done in trunk exclusively (UHCI implementation may be an exception) svn path=/trunk/; revision=55568
This commit is contained in:
parent
b0a26de757
commit
98d609d403
|
@ -89,6 +89,7 @@ public:
|
||||||
|
|
||||||
// local
|
// local
|
||||||
BOOLEAN InterruptService();
|
BOOLEAN InterruptService();
|
||||||
|
VOID PrintCapabilities();
|
||||||
|
|
||||||
// friend function
|
// friend function
|
||||||
friend BOOLEAN NTAPI InterruptServiceRoutine(IN PKINTERRUPT Interrupt, IN PVOID ServiceContext);
|
friend BOOLEAN NTAPI InterruptServiceRoutine(IN PKINTERRUPT Interrupt, IN PVOID ServiceContext);
|
||||||
|
@ -292,6 +293,49 @@ CUSBHardwareDevice::EHCI_WRITE_REGISTER_ULONG(ULONG Offset, ULONG Value)
|
||||||
WRITE_REGISTER_ULONG((PULONG)((ULONG)m_Base + Offset), Value);
|
WRITE_REGISTER_ULONG((PULONG)((ULONG)m_Base + Offset), Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
CUSBHardwareDevice::PrintCapabilities()
|
||||||
|
{
|
||||||
|
if (m_Capabilities.HCSParams.PortPowerControl)
|
||||||
|
{
|
||||||
|
DPRINT1("Controler EHCI has Port Power Control\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
DPRINT1("Controller Port Routing Rules %d\n", m_Capabilities.HCSParams.PortRouteRules);
|
||||||
|
DPRINT1("Number of Ports per Companion Controller %d\n", m_Capabilities.HCSParams.PortPerCHC);
|
||||||
|
DPRINT1("Number of Companion Controller %d\n", m_Capabilities.HCSParams.CHCCount);
|
||||||
|
|
||||||
|
if (m_Capabilities.HCSParams.PortIndicator)
|
||||||
|
{
|
||||||
|
DPRINT1("Controller has Port Indicators Support\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_Capabilities.HCSParams.DbgPortNum)
|
||||||
|
{
|
||||||
|
DPRINT1("Controller has Debug Port Support At Port %x\n", m_Capabilities.HCSParams.DbgPortNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_Capabilities.HCCParams.EECPCapable)
|
||||||
|
{
|
||||||
|
DPRINT1("Controller has Extended Capabilities Support\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_Capabilities.HCCParams.ParkMode)
|
||||||
|
{
|
||||||
|
DPRINT1("Controller supports Asynchronous Schedule Park\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_Capabilities.HCCParams.VarFrameList)
|
||||||
|
{
|
||||||
|
DPRINT1("Controller supports Programmable Frame List Size\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_Capabilities.HCCParams.CurAddrBits)
|
||||||
|
{
|
||||||
|
DPRINT1("Controller uses 64-Bit Addressing\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
CUSBHardwareDevice::PnpStart(
|
CUSBHardwareDevice::PnpStart(
|
||||||
PCM_RESOURCE_LIST RawResources,
|
PCM_RESOURCE_LIST RawResources,
|
||||||
|
@ -368,11 +412,15 @@ CUSBHardwareDevice::PnpStart(
|
||||||
m_Capabilities.HCCParamsLong = READ_REGISTER_ULONG((PULONG)((ULONG)ResourceBase + EHCI_HCCPARAMS));
|
m_Capabilities.HCCParamsLong = READ_REGISTER_ULONG((PULONG)((ULONG)ResourceBase + EHCI_HCCPARAMS));
|
||||||
|
|
||||||
DPRINT1("Controller has %d Length\n", m_Capabilities.Length);
|
DPRINT1("Controller has %d Length\n", m_Capabilities.Length);
|
||||||
DPRINT1("Controller has %d Ports\n", m_Capabilities.HCSParams.PortCount);
|
|
||||||
DPRINT1("Controller EHCI Version %x\n", m_Capabilities.HCIVersion);
|
DPRINT1("Controller EHCI Version %x\n", m_Capabilities.HCIVersion);
|
||||||
DPRINT1("Controler EHCI Caps HCSParamsLong %x\n", m_Capabilities.HCSParamsLong);
|
DPRINT1("Controler EHCI Caps HCSParamsLong %x\n", m_Capabilities.HCSParamsLong);
|
||||||
DPRINT1("Controler EHCI Caps HCCParamsLong %x\n", m_Capabilities.HCCParamsLong);
|
DPRINT1("Controler EHCI Caps HCCParamsLong %x\n", m_Capabilities.HCCParamsLong);
|
||||||
DPRINT1("Controler EHCI Caps PowerControl %x\n", m_Capabilities.HCSParams.PortPowerControl);
|
DPRINT1("Controller has %d Ports\n", m_Capabilities.HCSParams.PortCount);
|
||||||
|
|
||||||
|
//
|
||||||
|
// print capabilities
|
||||||
|
//
|
||||||
|
PrintCapabilities();
|
||||||
|
|
||||||
if (m_Capabilities.HCSParams.PortRouteRules)
|
if (m_Capabilities.HCSParams.PortRouteRules)
|
||||||
{
|
{
|
||||||
|
|
|
@ -145,6 +145,7 @@ typedef struct _QUEUE_TRANSFER_DESCRIPTOR
|
||||||
ULONG DWord;
|
ULONG DWord;
|
||||||
} Token;
|
} Token;
|
||||||
ULONG BufferPointer[5];
|
ULONG BufferPointer[5];
|
||||||
|
ULONG ExtendedBufferPointer[5];
|
||||||
|
|
||||||
//Software
|
//Software
|
||||||
ULONG PhysicalAddr;
|
ULONG PhysicalAddr;
|
||||||
|
@ -152,7 +153,7 @@ typedef struct _QUEUE_TRANSFER_DESCRIPTOR
|
||||||
ULONG TotalBytesToTransfer;
|
ULONG TotalBytesToTransfer;
|
||||||
} QUEUE_TRANSFER_DESCRIPTOR, *PQUEUE_TRANSFER_DESCRIPTOR;
|
} QUEUE_TRANSFER_DESCRIPTOR, *PQUEUE_TRANSFER_DESCRIPTOR;
|
||||||
|
|
||||||
C_ASSERT(FIELD_OFFSET(QUEUE_TRANSFER_DESCRIPTOR, PhysicalAddr) == 0x20);
|
C_ASSERT(FIELD_OFFSET(QUEUE_TRANSFER_DESCRIPTOR, PhysicalAddr) == 0x34);
|
||||||
|
|
||||||
//
|
//
|
||||||
// EndPointSpeeds Flags and END_POINT_CHARACTERISTICS
|
// EndPointSpeeds Flags and END_POINT_CHARACTERISTICS
|
||||||
|
@ -212,6 +213,7 @@ typedef struct _QUEUE_HEAD
|
||||||
ULONG DWord;
|
ULONG DWord;
|
||||||
} Token;
|
} Token;
|
||||||
ULONG BufferPointer[5];
|
ULONG BufferPointer[5];
|
||||||
|
ULONG ExtendedBufferPointer[5];
|
||||||
|
|
||||||
//Software
|
//Software
|
||||||
ULONG PhysicalAddr;
|
ULONG PhysicalAddr;
|
||||||
|
@ -231,7 +233,7 @@ C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, NextPointer) == 0x10);
|
||||||
C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, AlternateNextPointer) == 0x14);
|
C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, AlternateNextPointer) == 0x14);
|
||||||
C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, Token) == 0x18);
|
C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, Token) == 0x18);
|
||||||
C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, BufferPointer) == 0x1C);
|
C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, BufferPointer) == 0x1C);
|
||||||
C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, PhysicalAddr) == 0x30);
|
C_ASSERT(FIELD_OFFSET(QUEUE_HEAD, PhysicalAddr) == 0x44);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue