TianoCore EDK2 master
|
#include "Ehci.h"
Go to the source code of this file.
The EHCI register operation routines.
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file EhciReg.c.
VOID EhcAckAllInterrupt | ( | IN USB2_HC_DEV * | Ehc | ) |
VOID EhcClearLegacySupport | ( | IN USB2_HC_DEV * | Ehc | ) |
VOID EhcClearOpRegBit | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT32 | Offset, | ||
IN UINT32 | Bit | ||
) |
EFI_STATUS EhcEnableAsyncSchd | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT32 | Timeout | ||
) |
EFI_STATUS EhcEnablePeriodSchd | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT32 | Timeout | ||
) |
Enable the periodic schedule then wait EHC to actually enable it.
Ehc | The EHCI device. |
Timeout | The time to wait before abort (in millisecond, ms). |
EFI_SUCCESS | The periodical schedule is enabled. |
EFI_TIMEOUT | Time out happened while enabling periodic schedule. |
EFI_STATUS EhcHaltHC | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT32 | Timeout | ||
) |
EFI_STATUS EhcInitHC | ( | IN USB2_HC_DEV * | Ehc | ) |
Initialize the HC hardware. EHCI spec lists the five things to do to initialize the hardware:
Ehc | The EHCI device. |
BOOLEAN EhcIsDebugPortInUse | ( | IN CONST USB2_HC_DEV * | Ehc, |
IN CONST UINT8 *PortNumber | OPTIONAL | ||
) |
Check whether the host controller has an in-use debug port.
[in] | Ehc | The Enhanced Host Controller to query. |
[in] | PortNumber | If PortNumber is not NULL, then query whether PortNumber is an in-use debug port on Ehc. (PortNumber is taken in UEFI notation, i.e., zero-based.) Otherwise, query whether Ehc has any in-use debug port. |
TRUE | PortNumber is an in-use debug port on Ehc (if PortNumber is not NULL), or some port on Ehc is an in-use debug port (otherwise). |
FALSE | PortNumber is not an in-use debug port on Ehc (if PortNumber is not NULL), or no port on Ehc is an in-use debug port (otherwise). |
BOOLEAN EhcIsHalt | ( | IN USB2_HC_DEV * | Ehc | ) |
BOOLEAN EhcIsSysError | ( | IN USB2_HC_DEV * | Ehc | ) |
UINT32 EhcReadCapRegister | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT32 | Offset | ||
) |
UINT32 EhcReadDbgRegister | ( | IN CONST USB2_HC_DEV * | Ehc, |
IN UINT32 | Offset | ||
) |
UINT32 EhcReadOpReg | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT32 | Offset | ||
) |
EFI_STATUS EhcResetHC | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT32 | Timeout | ||
) |
EFI_STATUS EhcRunHC | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT32 | Timeout | ||
) |
EFI_STATUS EhcSetAndWaitDoorBell | ( | IN 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_SUCCESS | Synchronized with the hardware. |
EFI_TIMEOUT | Time out happened while waiting door bell to set. |
VOID EhcSetOpRegBit | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT32 | Offset, | ||
IN UINT32 | Bit | ||
) |
EFI_STATUS EhcWaitOpRegBit | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT32 | Offset, | ||
IN UINT32 | Bit, | ||
IN BOOLEAN | WaitToSet, | ||
IN UINT32 | Timeout | ||
) |
Wait the operation register's bit as specified by Bit to become set (or clear).
Ehc | The EHCI device. |
Offset | The offset of the operation register. |
Bit | The bit of the register to wait for. |
WaitToSet | Wait the bit to set or clear. |
Timeout | The time to wait before abort (in millisecond). |
EFI_SUCCESS | The bit successfully changed by host controller. |
EFI_TIMEOUT | The time out occurred. |