TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | USB_PORT_STATE_MAP |
struct | USB_CLASSC |
Macros | |
#define | EHC_CAPLENGTH_OFFSET 0 |
#define | EHC_HCSPARAMS_OFFSET 0x04 |
#define | EHC_HCCPARAMS_OFFSET 0x08 |
#define | HCSP_NPORTS 0x0F |
#define | HCCP_64BIT 0x01 |
#define | EHC_USBCMD_OFFSET 0x0 |
#define | EHC_USBSTS_OFFSET 0x04 |
#define | EHC_USBINTR_OFFSET 0x08 |
#define | EHC_FRINDEX_OFFSET 0x0C |
#define | EHC_CTRLDSSEG_OFFSET 0x10 |
#define | EHC_FRAME_BASE_OFFSET 0x14 |
#define | EHC_ASYNC_HEAD_OFFSET 0x18 |
#define | EHC_CONFIG_FLAG_OFFSET 0x40 |
#define | EHC_PORT_STAT_OFFSET 0x44 |
#define | EHC_FRAME_LEN 1024 |
#define | CONFIGFLAG_ROUTE_EHC 0x01 |
#define | USBCMD_RUN 0x01 |
#define | USBCMD_RESET 0x02 |
#define | USBCMD_ENABLE_PERIOD 0x10 |
#define | USBCMD_ENABLE_ASYNC 0x20 |
#define | USBCMD_IAAD 0x40 |
#define | USBSTS_IAA 0x20 |
#define | USBSTS_PERIOD_ENABLED 0x4000 |
#define | USBSTS_ASYNC_ENABLED 0x8000 |
#define | USBSTS_HALT 0x1000 |
#define | USBSTS_SYS_ERROR 0x10 |
#define | USBSTS_INTACK_MASK 0x003F |
#define | PORTSC_CONN 0x01 |
#define | PORTSC_CONN_CHANGE 0x02 |
#define | PORTSC_ENABLED 0x04 |
#define | PORTSC_ENABLE_CHANGE 0x08 |
#define | PORTSC_OVERCUR 0x10 |
#define | PORTSC_OVERCUR_CHANGE 0x20 |
#define | PORSTSC_RESUME 0x40 |
#define | PORTSC_SUSPEND 0x80 |
#define | PORTSC_RESET 0x100 |
#define | PORTSC_LINESTATE_K 0x400 |
#define | PORTSC_LINESTATE_J 0x800 |
#define | PORTSC_POWER 0x1000 |
#define | PORTSC_OWNER 0x2000 |
#define | PORTSC_CHANGE_MASK 0x2A |
#define | EHC_BAR_INDEX 0 |
#define | EHC_LINK_TERMINATED(Link) (((Link) & 0x01) != 0) |
#define | EHC_ADDR(High, QhHw32) ((VOID *) (UINTN) (LShiftU64 ((High), 32) | ((QhHw32) & 0xFFFFFFF0))) |
#define | EHCI_IS_DATAIN(EndpointAddr) EHC_BIT_IS_SET((EndpointAddr), 0x80) |
Functions | |
UINT32 | EhcReadCapRegister (IN PEI_USB2_HC_DEV *Ehc, IN UINT32 Offset) |
UINT32 | EhcReadOpReg (IN PEI_USB2_HC_DEV *Ehc, IN UINT32 Offset) |
VOID | EhcWriteOpReg (IN PEI_USB2_HC_DEV *Ehc, IN UINT32 Offset, IN UINT32 Data) |
VOID | EhcClearLegacySupport (IN PEI_USB2_HC_DEV *Ehc) |
EFI_STATUS | EhcSetAndWaitDoorBell (IN PEI_USB2_HC_DEV *Ehc, IN UINT32 Timeout) |
VOID | EhcAckAllInterrupt (IN PEI_USB2_HC_DEV *Ehc) |
BOOLEAN | EhcIsHalt (IN PEI_USB2_HC_DEV *Ehc) |
BOOLEAN | EhcIsSysError (IN PEI_USB2_HC_DEV *Ehc) |
EFI_STATUS | EhcResetHC (IN PEI_USB2_HC_DEV *Ehc, IN UINT32 Timeout) |
EFI_STATUS | EhcHaltHC (IN PEI_USB2_HC_DEV *Ehc, IN UINT32 Timeout) |
EFI_STATUS | EhcRunHC (IN PEI_USB2_HC_DEV *Ehc, IN UINT32 Timeout) |
EFI_STATUS | EhcInitHC (IN PEI_USB2_HC_DEV *Ehc) |
Private Header file for Usb Host Controller PEIM
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file EhciReg.h.
#define EHCI_IS_DATAIN | ( | EndpointAddr | ) | EHC_BIT_IS_SET((EndpointAddr), 0x80) |
VOID EhcAckAllInterrupt | ( | IN PEI_USB2_HC_DEV * | Ehc | ) |
VOID EhcClearLegacySupport | ( | IN PEI_USB2_HC_DEV * | Ehc | ) |
Stop the legacy USB SMI support.
Ehc | The EHCI device. |
EFI_STATUS EhcHaltHC | ( | IN PEI_USB2_HC_DEV * | Ehc, |
IN UINT32 | Timeout | ||
) |
EFI_STATUS EhcInitHC | ( | IN PEI_USB2_HC_DEV * | Ehc | ) |
Initialize the HC hardware. EHCI spec lists the five things to do to initialize the hardware.
Ehc | The EHCI device. |
EFI_SUCCESS | The EHCI has come out of halt state. |
EFI_TIMEOUT | Time out happened. |
BOOLEAN EhcIsHalt | ( | IN PEI_USB2_HC_DEV * | Ehc | ) |
BOOLEAN EhcIsSysError | ( | IN PEI_USB2_HC_DEV * | Ehc | ) |
UINT32 EhcReadCapRegister | ( | IN PEI_USB2_HC_DEV * | Ehc, |
IN UINT32 | Offset | ||
) |
UINT32 EhcReadOpReg | ( | IN PEI_USB2_HC_DEV * | Ehc, |
IN UINT32 | Offset | ||
) |
EFI_STATUS EhcResetHC | ( | IN PEI_USB2_HC_DEV * | Ehc, |
IN UINT32 | Timeout | ||
) |
EFI_STATUS EhcRunHC | ( | IN PEI_USB2_HC_DEV * | Ehc, |
IN UINT32 | Timeout | ||
) |
Set the EHCI to run
Ehc | The EHCI device. |
Timeout | Time to wait before abort. |
EFI_SUCCESS | The EHCI is running. |
Others | Failed to set the EHCI to run. |
Set the EHCI to run.
Ehc | The EHCI device. |
Timeout | Time to wait before abort. |
EFI_SUCCESS | The EHCI is running. |
Others | Failed to set the EHCI to run. |
EFI_STATUS EhcSetAndWaitDoorBell | ( | IN PEI_USB2_HC_DEV * | Ehc, |
IN UINT32 | Timeout | ||
) |
Set door bell and wait it to be ACKed by host controller. This function is used to synchronize with the hardware.
Ehc | The EHCI device. |
Timeout | The time to wait before abort (in millisecond, ms). |
EFI_TIMEOUT | Time out happened while waiting door bell to set. |
EFI_SUCCESS | Synchronized with the hardware. |