12 #ifndef _USB2_HOSTCONTROLLER_H_ 13 #define _USB2_HOSTCONTROLLER_H_ 19 #define EFI_USB2_HC_PROTOCOL_GUID \ 21 0x3e745226, 0x9818, 0x45b6, {0xa2, 0xac, 0xd7, 0xcd, 0xe, 0x8b, 0xa2, 0xbc } \ 37 #define USB_PORT_STAT_CONNECTION 0x0001 38 #define USB_PORT_STAT_ENABLE 0x0002 39 #define USB_PORT_STAT_SUSPEND 0x0004 40 #define USB_PORT_STAT_OVERCURRENT 0x0008 41 #define USB_PORT_STAT_RESET 0x0010 42 #define USB_PORT_STAT_POWER 0x0100 43 #define USB_PORT_STAT_LOW_SPEED 0x0200 44 #define USB_PORT_STAT_HIGH_SPEED 0x0400 45 #define USB_PORT_STAT_SUPER_SPEED 0x0800 46 #define USB_PORT_STAT_OWNER 0x2000 51 #define USB_PORT_STAT_C_CONNECTION 0x0001 52 #define USB_PORT_STAT_C_ENABLE 0x0002 53 #define USB_PORT_STAT_C_SUSPEND 0x0004 54 #define USB_PORT_STAT_C_OVERCURRENT 0x0008 55 #define USB_PORT_STAT_C_RESET 0x0010 75 #define EFI_USB_SPEED_FULL 0x0000 76 #define EFI_USB_SPEED_LOW 0x0001
77 #define EFI_USB_SPEED_HIGH 0x0002
78 #define EFI_USB_SPEED_SUPER 0x0003
113 #define EFI_USB_HC_RESET_GLOBAL 0x0001 114 #define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002 115 #define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG 0x0004 116 #define EFI_USB_HC_RESET_HOST_WITH_DEBUG 0x0008 262 #define EFI_USB_MAX_BULK_BUFFER_NUM 10 405 #define EFI_USB_MAX_ISO_BUFFER_NUM 7 406 #define EFI_USB_MAX_ISO_BUFFER_NUM1 2 EFI_USB2_HC_PROTOCOL_SET_STATE SetState
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
#define EFI_USB_MAX_ISO_BUFFER_NUM
The host controller is in halt state.
128 bit buffer containing a unique identifier value.
FILE_LICENCE(BSD2_PATENT)
The EFI_USB2_HC_PROTOCOL provides USB host controller management, basic data transactions over a USB ...
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, IN EFI_USB_PORT_FEATURE PortFeature)
Clears a feature for the specified root hub port.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_BULK_TRANSFER)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN UINT8 DataBuffersNumber, IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult)
Submits bulk transfer to a bulk endpoint of a USB device.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN OUT VOID *Data, IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult)
Submits synchronous interrupt transfer to an interrupt endpoint of a USB device.
EFI_USB2_HC_PROTOCOL_RESET Reset
EFI_USB_DATA_DIRECTION
USB data transfer direction.
UINT16 MajorRevision
The major revision number of the USB host controller.
UINT8 TranslatorHubAddress
device address
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN UINT8 DataBuffersNumber, IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM], IN UINTN DataLength, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult)
Submits isochronous transfer to an isochronous endpoint of a USB device.
EFI_GUID gEfiUsb2HcProtocolGuid
Format of Setup Data for USB Device Requests USB 2.0 spec, Section 9.3.
EFI_USB_PORT_FEATURE
Usb port features value Each value indicates its bit index in the port status and status change bitma...
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaxiumPacketLength, IN BOOLEAN IsNewTransfer, IN OUT UINT8 *DataToggle, IN UINTN PollingInterval OPTIONAL, IN UINTN DataLength OPTIONAL, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator OPTIONAL, IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction OPTIONAL, IN VOID *Context OPTIONAL)
Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.
EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_SET_STATE)(IN EFI_USB2_HC_PROTOCOL *This, IN EFI_USB_HC_STATE State)
Sets the USB host controller to a specific state.
#define EFI_USB_MAX_BULK_BUFFER_NUM
UINT16 MinorRevision
The minor revision number of the USB host controller.
EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer
The host controller is in the suspend state.
EFI_USB2_HC_PROTOCOL_GET_STATE GetState
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, IN EFI_USB_PORT_FEATURE PortFeature)
Sets a feature for the specified root hub port.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_GET_CAPABILITY)(IN EFI_USB2_HC_PROTOCOL *This, OUT UINT8 *MaxSpeed, OUT UINT8 *PortNumber, OUT UINT8 *Is64BitCapable)
Retrieves the Host Controller capabilities.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_GET_STATE)(IN EFI_USB2_HC_PROTOCOL *This, OUT EFI_USB_HC_STATE *State)
Retrieves current state of the USB host controller.
UINT64 UINTN
Unsigned value of native width.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_RESET)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT16 Attributes)
Provides software reset for the USB host controller.
#define VOID
Undeclared type.
EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, OUT EFI_USB_PORT_STATUS *PortStatus)
Retrieves the current status of a USB root hub port.
EFI Usb I/O Protocol as defined in UEFI specification.
The host controller is in an operational state.
UINT16 PortChangeStatus
Contains current port status change bitmap.
EFI_USB2_HC_PROTOCOL_BULK_TRANSFER BulkTransfer
EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature
EFI_USB_HC_STATE
Enumration value for status of USB HC.
EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature
EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN EFI_USB_DEVICE_REQUEST *Request, IN EFI_USB_DATA_DIRECTION TransferDirection, IN OUT VOID *Data OPTIONAL, IN OUT UINTN *DataLength OPTIONAL, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult)
Submits control transfer to a target USB device.
Maximum value for enumration value of HC status.
volatile unsigned int DataLength
UINT8 TranslatorPortNumber
the port number of the hub that device is connected to.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN UINT8 DataBuffersNumber, IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM], IN UINTN DataLength, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack, IN VOID *Context OPTIONAL)
Submits nonblocking isochronous transfer to an isochronous endpoint of a USB device.
UINT16 PortStatus
Contains current port status bitmap.
EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer
EFI_STATUS(EFIAPI * EFI_ASYNC_USB_TRANSFER_CALLBACK)(IN VOID *Data, IN UINTN DataLength, IN VOID *Context, IN UINT32 Status)
Async USB transfer callback routine.
EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer
EFI_USB2_HC_PROTOCOL_GET_CAPABILITY GetCapability