30 Status = PciIo->Io.Read (
39 if (EFI_ERROR (Status)) {
40 DEBUG ((DEBUG_ERROR,
"UhciReadReg: PciIo Io.Read error: %r at offset %d\n", Status, Offset));
65 Status = PciIo->Io.Write (
74 if (EFI_ERROR (Status)) {
75 DEBUG ((DEBUG_ERROR,
"UhciWriteReg: PciIo Io.Write error: %r at offset %d\n", Status, Offset));
97 Data = (UINT16)(Data |Bit);
119 Data = (UINT16)(Data & ~Bit);
142 DEBUG ((DEBUG_ERROR,
"UhciAckAllInterrupt: re-enable the UHCI from system error\n"));
172 for (Index = 0; Index < (Timeout / 50) + 1; Index++) {
175 if ((UsbSts & USBSTS_HCH) == USBSTS_HCH) {
203 if ((UsbSts & (USBSTS_HCPE | USBSTS_HSE | USBSTS_HCH)) != 0) {
204 DEBUG ((DEBUG_ERROR,
"UhciIsHcWorking: current USB state is %x\n", UsbSts));
228 Data = (UINT32)((
UINTN)Addr & 0xFFFFF000);
230 Status = PciIo->Io.Write (
234 (UINT64)USB_FRAME_BASE_OFFSET,
239 if (EFI_ERROR (Status)) {
240 DEBUG ((DEBUG_ERROR,
"UhciSetFrameListBaseAddr: PciIo Io.Write error: %r\n", Status));
262 USB_EMULATION_OFFSET,
#define DEBUG(Expression)
@ EfiUsbHcStateOperational
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)