12#ifndef _USB2_HOSTCONTROLLER_H_
13#define _USB2_HOSTCONTROLLER_H_
17#define EFI_USB2_HC_PROTOCOL_GUID \
19 0x3e745226, 0x9818, 0x45b6, {0xa2, 0xac, 0xd7, 0xcd, 0xe, 0x8b, 0xa2, 0xbc } \
35#define USB_PORT_STAT_CONNECTION 0x0001
36#define USB_PORT_STAT_ENABLE 0x0002
37#define USB_PORT_STAT_SUSPEND 0x0004
38#define USB_PORT_STAT_OVERCURRENT 0x0008
39#define USB_PORT_STAT_RESET 0x0010
40#define USB_PORT_STAT_POWER 0x0100
41#define USB_PORT_STAT_LOW_SPEED 0x0200
42#define USB_PORT_STAT_HIGH_SPEED 0x0400
43#define USB_PORT_STAT_SUPER_SPEED 0x0800
44#define USB_PORT_STAT_OWNER 0x2000
49#define USB_PORT_STAT_C_CONNECTION 0x0001
50#define USB_PORT_STAT_C_ENABLE 0x0002
51#define USB_PORT_STAT_C_SUSPEND 0x0004
52#define USB_PORT_STAT_C_OVERCURRENT 0x0008
53#define USB_PORT_STAT_C_RESET 0x0010
62 EfiUsbPortSuspend = 2,
66 EfiUsbPortConnectChange = 16,
67 EfiUsbPortEnableChange = 17,
68 EfiUsbPortSuspendChange = 18,
69 EfiUsbPortOverCurrentChange = 19,
70 EfiUsbPortResetChange = 20
73#define EFI_USB_SPEED_FULL 0x0000
74#define EFI_USB_SPEED_LOW 0x0001
75#define EFI_USB_SPEED_HIGH 0x0002
76#define EFI_USB_SPEED_SUPER 0x0003
107 OUT UINT8 *PortNumber,
108 OUT UINT8 *Is64BitCapable
111#define EFI_USB_HC_RESET_GLOBAL 0x0001
112#define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002
113#define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG 0x0004
114#define EFI_USB_HC_RESET_HOST_WITH_DEBUG 0x0008
248 IN UINT8 DeviceAddress,
249 IN UINT8 DeviceSpeed,
257 OUT UINT32 *TransferResult
260#define EFI_USB_MAX_BULK_BUFFER_NUM 10
295 IN UINT8 DeviceAddress,
296 IN UINT8 EndPointAddress,
297 IN UINT8 DeviceSpeed,
299 IN UINT8 DataBuffersNumber,
300 IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM],
302 IN OUT UINT8 *DataToggle,
305 OUT UINT32 *TransferResult
344 IN UINT8 DeviceAddress,
345 IN UINT8 EndPointAddress,
346 IN UINT8 DeviceSpeed,
348 IN BOOLEAN IsNewTransfer,
349 IN OUT UINT8 *DataToggle,
391 IN UINT8 DeviceAddress,
392 IN UINT8 EndPointAddress,
393 IN UINT8 DeviceSpeed,
397 IN OUT UINT8 *DataToggle,
400 OUT UINT32 *TransferResult
403#define EFI_USB_MAX_ISO_BUFFER_NUM 7
404#define EFI_USB_MAX_ISO_BUFFER_NUM1 2
467 IN UINT8 DeviceAddress,
468 IN UINT8 EndPointAddress,
469 IN UINT8 DeviceSpeed,
471 IN UINT8 DataBuffersNumber,
472 IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
475 OUT UINT32 *TransferResult
542 IN UINT8 DeviceAddress,
543 IN UINT8 EndPointAddress,
544 IN UINT8 DeviceSpeed,
546 IN UINT8 DataBuffersNumber,
547 IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
655extern EFI_GUID gEfiUsb2HcProtocolGuid;
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)
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)
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_GET_CAPABILITY)(IN EFI_USB2_HC_PROTOCOL *This, OUT UINT8 *MaxSpeed, OUT UINT8 *PortNumber, OUT UINT8 *Is64BitCapable)
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)
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)
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_RESET)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT16 Attributes)
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)
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_SET_STATE)(IN EFI_USB2_HC_PROTOCOL *This, IN EFI_USB_HC_STATE State)
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)
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)
@ EfiUsbHcStateOperational
@ EfiUsbHcStateMaximum
Maximum value for enumration value of HC status.
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)
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_GET_STATE)(IN EFI_USB2_HC_PROTOCOL *This, OUT EFI_USB_HC_STATE *State)
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)
EFI_STATUS(EFIAPI * EFI_ASYNC_USB_TRANSFER_CALLBACK)(IN VOID *Data, IN UINTN DataLength, IN VOID *Context, IN UINT32 Status)
UINT8 TranslatorHubAddress
device address
UINT8 TranslatorPortNumber
the port number of the hub that device is connected to.
UINT16 PortChangeStatus
Contains current port status change bitmap.
UINT16 PortStatus
Contains current port status bitmap.