/* HC should halt within 16 ms, but use 32 ms as some hosts take longer */ #define XHCI_MAX_HALT_USEC (32 * 1000) /* HC not running - set to 1 when run/stop bit is cleared. */ #define XHCI_STS_HALT (1<<0)
/* HCCPARAMS offset from PCI base address */ #define XHCI_HCC_PARAMS_OFFSET 0x10 /* HCCPARAMS contains the first extended capability pointer */ #define XHCI_HCC_EXT_CAPS(p) (((p)>>16)&0xffff)
/* Command and Status registers offset from the Operational Registers address */ #define XHCI_CMD_OFFSET 0x00 #define XHCI_STS_OFFSET 0x04
#define XHCI_MAX_EXT_CAPS 50
/* Capability Register */ /* bits 7:0 - how long is the Capabilities register */ #define XHCI_HC_LENGTH(p) (((p)>>00)&0x00ff)
/* USB Legacy Support Capability - section 7.1.1 */ /* Add this offset, plus the value of xECP in HCCPARAMS to the base address */ #define XHCI_LEGACY_SUPPORT_OFFSET (0x00)
/* USB Legacy Support Control and Status Register - section 7.1.2 */ /* Add this offset, plus the value of xECP in HCCPARAMS to the base address */ #define XHCI_LEGACY_CONTROL_OFFSET (0x04) /* bits 1:3, 5:12, and 17:19 need to be preserved; bits 21:28 should be zero */ #define XHCI_LEGACY_DISABLE_SMI ((0x7 << 1) + (0xff << 5) + (0x7 << 17)) #define XHCI_LEGACY_SMI_EVENTS (0x7 << 29)
/* command register values to disable interrupts and halt the HC */ /* start/stop HC execution - do not write unless HC is halted*/ #define XHCI_CMD_RUN (1 << 0) /* Event Interrupt Enable - get irq when EINT bit is set in USBSTS register */ #define XHCI_CMD_EIE (1 << 2) /* Host System Error Interrupt Enable - get irq when HSEIE bit set in USBSTS */ #define XHCI_CMD_HSEIE (1 << 3) /* Enable Wrap Event - '1' means xHC generates an event when MFINDEX wraps. */ #define XHCI_CMD_EWE (1 << 10)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.