10#ifndef _EFI_UHCI_REG_H_
11#define _EFI_UHCI_REG_H_
17#define UHCI_FRAME_NUM 1024
22#define USB_BAR_INDEX 4
24#define USBCMD_OFFSET 0
25#define USBSTS_OFFSET 2
26#define USBINTR_OFFSET 4
27#define USBPORTSC_OFFSET 0x10
28#define USB_FRAME_NO_OFFSET 6
29#define USB_FRAME_BASE_OFFSET 8
30#define USB_EMULATION_OFFSET 0xC0
35#define SETUP_PACKET_ID 0x2D
36#define INPUT_PACKET_ID 0x69
37#define OUTPUT_PACKET_ID 0xE1
38#define ERROR_PACKET_ID 0x55
43#define USBPORTSC_CCS BIT0
44#define USBPORTSC_CSC BIT1
45#define USBPORTSC_PED BIT2
46#define USBPORTSC_PEDC BIT3
47#define USBPORTSC_LSL BIT4
48#define USBPORTSC_LSH BIT5
49#define USBPORTSC_RD BIT6
50#define USBPORTSC_LSDA BIT8
51#define USBPORTSC_PR BIT9
52#define USBPORTSC_SUSP BIT12
59#define USB_MAX_ROOTHUB_PORT 0x0F
65#define USBCMD_HCRESET BIT1
66#define USBCMD_GRESET BIT2
67#define USBCMD_EGSM BIT3
68#define USBCMD_FGR BIT4
69#define USBCMD_SWDBG BIT5
71#define USBCMD_MAXP BIT7
76#define USBSTS_USBINT BIT0
77#define USBSTS_ERROR BIT1
79#define USBSTS_HSE BIT3
80#define USBSTS_HCPE BIT4
81#define USBSTS_HCH BIT5
83#define USBTD_ACTIVE BIT7
84#define USBTD_STALLED BIT6
85#define USBTD_BUFFERR BIT5
86#define USBTD_BABBLE BIT4
89#define USBTD_BITSTUFF BIT1
BOOLEAN UhciIsHcWorking(IN EFI_PCI_IO_PROTOCOL *PciIo)
EFI_STATUS UhciStopHc(IN USB_HC_DEV *Uhc, IN UINTN Timeout)
VOID UhciClearRegBit(IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT32 Offset, IN UINT16 Bit)
VOID UhciTurnOffUsbEmulation(IN EFI_PCI_IO_PROTOCOL *PciIo)
VOID UhciWriteReg(IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT32 Offset, IN UINT16 Data)
VOID UhciSetRegBit(IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT32 Offset, IN UINT16 Bit)
VOID UhciSetFrameListBaseAddr(IN EFI_PCI_IO_PROTOCOL *PciIo, IN VOID *Addr)
UINT16 UhciReadReg(IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT32 Offset)
VOID UhciAckAllInterrupt(IN USB_HC_DEV *Uhc)