TianoCore EDK2 master
Loading...
Searching...
No Matches
Ehci.h File Reference

Go to the source code of this file.

Data Structures

struct  _USB2_HC_DEV
 

Macros

#define EHC_1_MICROSECOND   1
 
#define EHC_1_MILLISECOND   (1000 * EHC_1_MICROSECOND)
 
#define EHC_1_SECOND   (1000 * EHC_1_MILLISECOND)
 
#define EHC_RESET_TIMEOUT   (1 * EHC_1_SECOND)
 
#define EHC_GENERIC_TIMEOUT   (10 * EHC_1_MILLISECOND)
 
#define EHC_ROOT_PORT_RECOVERY_STALL   (20 * EHC_1_MILLISECOND)
 
#define EHC_SYNC_POLL_INTERVAL   (1 * EHC_1_MILLISECOND)
 
#define EHC_ASYNC_POLL_INTERVAL   EFI_TIMER_PERIOD_MILLISECONDS(1)
 
#define USB_DEBUG_PORT_IN_USE   BIT10
 
#define USB_DEBUG_PORT_ENABLE   BIT28
 
#define USB_DEBUG_PORT_OWNER   BIT30
 
#define USB_DEBUG_PORT_IN_USE_MASK
 
#define EHC_TPL   TPL_NOTIFY
 
#define EFI_LIST_CONTAINER(Entry, Type, Field)   BASE_CR(Entry, Type, Field)
 
#define EHC_LOW_32BIT(Addr64)   ((UINT32)(((UINTN)(Addr64)) & 0XFFFFFFFF))
 
#define EHC_HIGH_32BIT(Addr64)   ((UINT32)(RShiftU64((UINTN)(Addr64), 32) & 0XFFFFFFFF))
 
#define EHC_BIT_IS_SET(Data, Bit)   ((BOOLEAN)(((Data) & (Bit)) == (Bit)))
 
#define EHC_REG_BIT_IS_SET(Ehc, Offset, Bit)    (EHC_BIT_IS_SET(EhcReadOpReg ((Ehc), (Offset)), (Bit)))
 
#define USB2_HC_DEV_SIGNATURE   SIGNATURE_32 ('e', 'h', 'c', 'i')
 
#define EHC_FROM_THIS(a)   CR(a, USB2_HC_DEV, Usb2Hc, USB2_HC_DEV_SIGNATURE)
 

Typedefs

typedef struct _USB2_HC_DEV USB2_HC_DEV
 

Functions

EFI_STATUS EFIAPI EhcDriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI EhcDriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI EhcDriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
 

Variables

EFI_DRIVER_BINDING_PROTOCOL gEhciDriverBinding
 
EFI_COMPONENT_NAME_PROTOCOL gEhciComponentName
 
EFI_COMPONENT_NAME2_PROTOCOL gEhciComponentName2
 

Detailed Description

Provides some data struct used by EHCI controller driver.

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

Definition in file Ehci.h.

Macro Definition Documentation

◆ EFI_LIST_CONTAINER

#define EFI_LIST_CONTAINER (   Entry,
  Type,
  Field 
)    BASE_CR(Entry, Type, Field)

Definition at line 83 of file Ehci.h.

◆ EHC_1_MICROSECOND

#define EHC_1_MICROSECOND   1

Definition at line 46 of file Ehci.h.

◆ EHC_1_MILLISECOND

#define EHC_1_MILLISECOND   (1000 * EHC_1_MICROSECOND)

Definition at line 47 of file Ehci.h.

◆ EHC_1_SECOND

#define EHC_1_SECOND   (1000 * EHC_1_MILLISECOND)

Definition at line 48 of file Ehci.h.

◆ EHC_ASYNC_POLL_INTERVAL

#define EHC_ASYNC_POLL_INTERVAL   EFI_TIMER_PERIOD_MILLISECONDS(1)

Definition at line 66 of file Ehci.h.

◆ EHC_BIT_IS_SET

#define EHC_BIT_IS_SET (   Data,
  Bit 
)    ((BOOLEAN)(((Data) & (Bit)) == (Bit)))

Definition at line 87 of file Ehci.h.

◆ EHC_FROM_THIS

#define EHC_FROM_THIS (   a)    CR(a, USB2_HC_DEV, Usb2Hc, USB2_HC_DEV_SIGNATURE)

Definition at line 93 of file Ehci.h.

◆ EHC_GENERIC_TIMEOUT

#define EHC_GENERIC_TIMEOUT   (10 * EHC_1_MILLISECOND)

Definition at line 54 of file Ehci.h.

◆ EHC_HIGH_32BIT

#define EHC_HIGH_32BIT (   Addr64)    ((UINT32)(RShiftU64((UINTN)(Addr64), 32) & 0XFFFFFFFF))

Definition at line 86 of file Ehci.h.

◆ EHC_LOW_32BIT

#define EHC_LOW_32BIT (   Addr64)    ((UINT32)(((UINTN)(Addr64)) & 0XFFFFFFFF))

Definition at line 85 of file Ehci.h.

◆ EHC_REG_BIT_IS_SET

#define EHC_REG_BIT_IS_SET (   Ehc,
  Offset,
  Bit 
)     (EHC_BIT_IS_SET(EhcReadOpReg ((Ehc), (Offset)), (Bit)))

Definition at line 89 of file Ehci.h.

◆ EHC_RESET_TIMEOUT

#define EHC_RESET_TIMEOUT   (1 * EHC_1_SECOND)

Definition at line 53 of file Ehci.h.

◆ EHC_ROOT_PORT_RECOVERY_STALL

#define EHC_ROOT_PORT_RECOVERY_STALL   (20 * EHC_1_MILLISECOND)

Definition at line 59 of file Ehci.h.

◆ EHC_SYNC_POLL_INTERVAL

#define EHC_SYNC_POLL_INTERVAL   (1 * EHC_1_MILLISECOND)

Definition at line 65 of file Ehci.h.

◆ EHC_TPL

#define EHC_TPL   TPL_NOTIFY

Definition at line 81 of file Ehci.h.

◆ USB2_HC_DEV_SIGNATURE

#define USB2_HC_DEV_SIGNATURE   SIGNATURE_32 ('e', 'h', 'c', 'i')

Definition at line 92 of file Ehci.h.

◆ USB_DEBUG_PORT_ENABLE

#define USB_DEBUG_PORT_ENABLE   BIT28

Definition at line 72 of file Ehci.h.

◆ USB_DEBUG_PORT_IN_USE

#define USB_DEBUG_PORT_IN_USE   BIT10

Definition at line 71 of file Ehci.h.

◆ USB_DEBUG_PORT_IN_USE_MASK

#define USB_DEBUG_PORT_IN_USE_MASK
Value:
(USB_DEBUG_PORT_IN_USE | \
USB_DEBUG_PORT_OWNER)

Definition at line 74 of file Ehci.h.

◆ USB_DEBUG_PORT_OWNER

#define USB_DEBUG_PORT_OWNER   BIT30

Definition at line 73 of file Ehci.h.

Typedef Documentation

◆ USB2_HC_DEV

typedef struct _USB2_HC_DEV USB2_HC_DEV

Definition at line 33 of file Ehci.h.

Function Documentation

◆ EhcDriverBindingStart()

EFI_STATUS EFIAPI EhcDriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  Controller,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Starting the Usb EHCI Driver.

Parameters
ThisProtocol instance pointer.
ControllerHandle of device to test.
RemainingDevicePathNot used.
Returns
EFI_SUCCESS supports this device.
EFI_UNSUPPORTED do not support this device.
EFI_DEVICE_ERROR cannot be started due to device Error.
EFI_OUT_OF_RESOURCES cannot allocate resources.

Definition at line 1637 of file Ehci.c.

◆ EhcDriverBindingStop()

EFI_STATUS EFIAPI EhcDriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  Controller,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE ChildHandleBuffer 
)

Stop this driver on ControllerHandle. Support stopping any child handles created by this driver.

Parameters
ThisProtocol instance pointer.
ControllerHandle of device to stop driver on.
NumberOfChildrenNumber of Children in the ChildHandleBuffer.
ChildHandleBufferList of handles for the children we need to stop.
Returns
EFI_SUCCESS Success.
EFI_DEVICE_ERROR Fail.

Definition at line 2003 of file Ehci.c.

◆ EhcDriverBindingSupported()

EFI_STATUS EFIAPI EhcDriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  Controller,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Test to see if this driver supports ControllerHandle. Any ControllerHandle that has Usb2HcProtocol installed will be supported.

Parameters
ThisProtocol instance pointer.
ControllerHandle of device to test.
RemainingDevicePathNot used.
Returns
EFI_SUCCESS This driver supports this device.
EFI_UNSUPPORTED This driver does not support this device.

Definition at line 1326 of file Ehci.c.

Variable Documentation

◆ gEhciComponentName

EFI_COMPONENT_NAME_PROTOCOL gEhciComponentName
extern

Definition at line 15 of file ComponentName.c.

◆ gEhciComponentName2

EFI_COMPONENT_NAME2_PROTOCOL gEhciComponentName2
extern

Definition at line 24 of file ComponentName.c.

◆ gEhciDriverBinding

EFI_DRIVER_BINDING_PROTOCOL gEhciDriverBinding
extern

Definition at line 42 of file Ehci.c.