#define USB_HUB_CLASS_CODE 0x09\r
#define USB_HUB_SUBCLASS_CODE 0x00\r
\r
+#define XHC_CAP_USB_LEGACY 0x01\r
+#define XHC_CAP_USB_DEBUG 0x0A\r
+\r
//============================================//\r
// XHCI register offset //\r
//============================================//\r
#define XHC_ERSTBA_OFFSET 0x30 // Event Ring Segment Table Base Address Register Offset\r
#define XHC_ERDP_OFFSET 0x38 // Event Ring Dequeue Pointer Register Offset\r
\r
+//\r
+// Debug registers offset\r
+//\r
+#define XHC_DC_DCCTRL 0x20\r
+\r
#define USBLEGSP_BIOS_SEMAPHORE BIT16 // HC BIOS Owned Semaphore\r
#define USBLEGSP_OS_SEMAPHORE BIT24 // HC OS Owned Semaphore\r
\r
IN UINT32 Bit\r
);\r
\r
+/**\r
+ Read XHCI extended capability register.\r
+\r
+ @param Xhc The XHCI Instance.\r
+ @param Offset The offset of the extended capability register.\r
+\r
+ @return The register content read\r
+\r
+**/\r
+UINT32\r
+XhcReadExtCapReg (\r
+ IN USB_XHCI_INSTANCE *Xhc,\r
+ IN UINT32 Offset\r
+ );\r
+\r
/**\r
Whether the XHCI host controller is halted.\r
\r
);\r
\r
/**\r
- Calculate the XHCI legacy support capability register offset.\r
+ Calculate the offset of the XHCI capability.\r
\r
@param Xhc The XHCI Instance.\r
+ @param CapId The XHCI Capability ID.\r
\r
@return The offset of XHCI legacy support capability register.\r
\r
**/\r
UINT32\r
-XhcGetLegSupCapAddr (\r
- IN USB_XHCI_INSTANCE *Xhc\r
+XhcGetCapabilityAddr (\r
+ IN USB_XHCI_INSTANCE *Xhc,\r
+ IN UINT8 CapId\r
);\r
\r
#endif\r