TianoCore EDK2 master
Loading...
Searching...
No Matches
UhciReg.c File Reference
#include "Uhci.h"

Go to the source code of this file.

Functions

UINT16 UhciReadReg (IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT32 Offset)
 
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 UhciClearRegBit (IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINT32 Offset, IN UINT16 Bit)
 
VOID UhciAckAllInterrupt (IN USB_HC_DEV *Uhc)
 
EFI_STATUS UhciStopHc (IN USB_HC_DEV *Uhc, IN UINTN Timeout)
 
BOOLEAN UhciIsHcWorking (IN EFI_PCI_IO_PROTOCOL *PciIo)
 
VOID UhciSetFrameListBaseAddr (IN EFI_PCI_IO_PROTOCOL *PciIo, IN VOID *Addr)
 
VOID UhciTurnOffUsbEmulation (IN EFI_PCI_IO_PROTOCOL *PciIo)
 

Detailed Description

The UHCI register operation routines.

Copyright (c) 2007, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UhciReg.c.

Function Documentation

◆ UhciAckAllInterrupt()

VOID UhciAckAllInterrupt ( IN USB_HC_DEV Uhc)

Clear all the interrutp status bits, these bits are Write-Clean.

Parameters
UhcThe UHCI device.

Definition at line 131 of file UhciReg.c.

◆ UhciClearRegBit()

VOID UhciClearRegBit ( IN EFI_PCI_IO_PROTOCOL PciIo,
IN UINT32  Offset,
IN UINT16  Bit 
)

Clear a bit of the UHCI Register.

Parameters
PciIoThe PCI_IO protocol to access the PCI.
OffsetRegister offset to USB_BAR_INDEX.
BitThe bit to clear.

Definition at line 110 of file UhciReg.c.

◆ UhciIsHcWorking()

BOOLEAN UhciIsHcWorking ( IN EFI_PCI_IO_PROTOCOL PciIo)

Check whether the host controller operates well.

Parameters
PciIoThe PCI_IO protocol to use.
Return values
TRUEHost controller is working.
FALSEHost controller is halted or system error.

Definition at line 195 of file UhciReg.c.

◆ UhciReadReg()

UINT16 UhciReadReg ( IN EFI_PCI_IO_PROTOCOL PciIo,
IN UINT32  Offset 
)

Read a UHCI register.

Parameters
PciIoThe EFI_PCI_IO_PROTOCOL to use.
OffsetRegister offset to USB_BAR_INDEX.
Returns
Content of register.

Definition at line 22 of file UhciReg.c.

◆ UhciSetFrameListBaseAddr()

VOID UhciSetFrameListBaseAddr ( IN EFI_PCI_IO_PROTOCOL PciIo,
IN VOID *  Addr 
)

Set the UHCI frame list base address. It can't use UhciWriteReg which access memory in UINT16.

Parameters
PciIoThe EFI_PCI_IO_PROTOCOL to use.
AddrAddress to set.

Definition at line 220 of file UhciReg.c.

◆ UhciSetRegBit()

VOID UhciSetRegBit ( IN EFI_PCI_IO_PROTOCOL PciIo,
IN UINT32  Offset,
IN UINT16  Bit 
)

Set a bit of the UHCI Register.

Parameters
PciIoThe EFI_PCI_IO_PROTOCOL to use.
OffsetRegister offset to USB_BAR_INDEX.
BitThe bit to set.

Definition at line 88 of file UhciReg.c.

◆ UhciStopHc()

EFI_STATUS UhciStopHc ( IN USB_HC_DEV Uhc,
IN UINTN  Timeout 
)

Stop the host controller.

Parameters
UhcThe UHCI device.
TimeoutMax time allowed.
Return values
EFI_SUCCESSThe host controller is stopped.
EFI_TIMEOUTFailed to stop the host controller.

Definition at line 158 of file UhciReg.c.

◆ UhciTurnOffUsbEmulation()

VOID UhciTurnOffUsbEmulation ( IN EFI_PCI_IO_PROTOCOL PciIo)

Disable USB Emulation.

Parameters
PciIoThe EFI_PCI_IO_PROTOCOL protocol to use.

Definition at line 251 of file UhciReg.c.

◆ UhciWriteReg()

VOID UhciWriteReg ( IN EFI_PCI_IO_PROTOCOL PciIo,
IN UINT32  Offset,
IN UINT16  Data 
)

Write data to UHCI register.

Parameters
PciIoThe EFI_PCI_IO_PROTOCOL to use.
OffsetRegister offset to USB_BAR_INDEX.
DataData to write.

Definition at line 57 of file UhciReg.c.