diff options
author | Michael Brown <mcb30@ipxe.org> | 2023-01-28 15:32:26 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2023-01-28 16:26:28 +0000 |
commit | 96395878b01a5a66c41b677910cde6b978e14f56 (patch) | |
tree | abe5e20e5195b1a330a40d9e659cd58f30ba07a1 /src/include/ipxe/efi/Protocol/Usb2HostController.h | |
parent | e222bfc355463a085240cf044f08518153056617 (diff) | |
download | ipxe-edk2.tar.gz |
[efi] Update to current EDK2 headersedk2
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/efi/Protocol/Usb2HostController.h')
-rw-r--r-- | src/include/ipxe/efi/Protocol/Usb2HostController.h | 101 |
1 files changed, 47 insertions, 54 deletions
diff --git a/src/include/ipxe/efi/Protocol/Usb2HostController.h b/src/include/ipxe/efi/Protocol/Usb2HostController.h index 8308e8f1b..657918d44 100644 --- a/src/include/ipxe/efi/Protocol/Usb2HostController.h +++ b/src/include/ipxe/efi/Protocol/Usb2HostController.h @@ -4,21 +4,15 @@ running in the EFI boot services environment, to perform data transactions over a USB bus. In addition, it provides an abstraction for the root hub of the USB bus. - Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef _USB2_HOSTCONTROLLER_H_ #define _USB2_HOSTCONTROLLER_H_ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Protocol/UsbIo.h> @@ -32,35 +26,33 @@ FILE_LICENCE ( BSD3 ); /// typedef struct _EFI_USB2_HC_PROTOCOL EFI_USB2_HC_PROTOCOL; - typedef struct { - UINT16 PortStatus; ///< Contains current port status bitmap. - UINT16 PortChangeStatus; ///< Contains current port status change bitmap. + UINT16 PortStatus; ///< Contains current port status bitmap. + UINT16 PortChangeStatus; ///< Contains current port status change bitmap. } EFI_USB_PORT_STATUS; /// /// EFI_USB_PORT_STATUS.PortStatus bit definition /// -#define USB_PORT_STAT_CONNECTION 0x0001 -#define USB_PORT_STAT_ENABLE 0x0002 -#define USB_PORT_STAT_SUSPEND 0x0004 -#define USB_PORT_STAT_OVERCURRENT 0x0008 -#define USB_PORT_STAT_RESET 0x0010 -#define USB_PORT_STAT_POWER 0x0100 -#define USB_PORT_STAT_LOW_SPEED 0x0200 -#define USB_PORT_STAT_HIGH_SPEED 0x0400 -#define USB_PORT_STAT_SUPER_SPEED 0x0800 -#define USB_PORT_STAT_OWNER 0x2000 +#define USB_PORT_STAT_CONNECTION 0x0001 +#define USB_PORT_STAT_ENABLE 0x0002 +#define USB_PORT_STAT_SUSPEND 0x0004 +#define USB_PORT_STAT_OVERCURRENT 0x0008 +#define USB_PORT_STAT_RESET 0x0010 +#define USB_PORT_STAT_POWER 0x0100 +#define USB_PORT_STAT_LOW_SPEED 0x0200 +#define USB_PORT_STAT_HIGH_SPEED 0x0400 +#define USB_PORT_STAT_SUPER_SPEED 0x0800 +#define USB_PORT_STAT_OWNER 0x2000 /// /// EFI_USB_PORT_STATUS.PortChangeStatus bit definition /// -#define USB_PORT_STAT_C_CONNECTION 0x0001 -#define USB_PORT_STAT_C_ENABLE 0x0002 -#define USB_PORT_STAT_C_SUSPEND 0x0004 -#define USB_PORT_STAT_C_OVERCURRENT 0x0008 -#define USB_PORT_STAT_C_RESET 0x0010 - +#define USB_PORT_STAT_C_CONNECTION 0x0001 +#define USB_PORT_STAT_C_ENABLE 0x0002 +#define USB_PORT_STAT_C_SUSPEND 0x0004 +#define USB_PORT_STAT_C_OVERCURRENT 0x0008 +#define USB_PORT_STAT_C_RESET 0x0010 /// /// Usb port features value @@ -80,14 +72,14 @@ typedef enum { EfiUsbPortResetChange = 20 } EFI_USB_PORT_FEATURE; -#define EFI_USB_SPEED_FULL 0x0000 ///< 12 Mb/s, USB 1.1 OHCI and UHCI HC. -#define EFI_USB_SPEED_LOW 0x0001 ///< 1 Mb/s, USB 1.1 OHCI and UHCI HC. -#define EFI_USB_SPEED_HIGH 0x0002 ///< 480 Mb/s, USB 2.0 EHCI HC. -#define EFI_USB_SPEED_SUPER 0x0003 ///< 4.8 Gb/s, USB 3.0 XHCI HC. +#define EFI_USB_SPEED_FULL 0x0000 ///< 12 Mb/s, USB 1.1 OHCI and UHCI HC. +#define EFI_USB_SPEED_LOW 0x0001 ///< 1 Mb/s, USB 1.1 OHCI and UHCI HC. +#define EFI_USB_SPEED_HIGH 0x0002 ///< 480 Mb/s, USB 2.0 EHCI HC. +#define EFI_USB_SPEED_SUPER 0x0003 ///< 4.8 Gb/s, USB 3.0 XHCI HC. typedef struct { - UINT8 TranslatorHubAddress; ///< device address - UINT8 TranslatorPortNumber; ///< the port number of the hub that device is connected to. + UINT8 TranslatorHubAddress; ///< device address + UINT8 TranslatorPortNumber; ///< the port number of the hub that device is connected to. } EFI_USB2_HC_TRANSACTION_TRANSLATOR; // @@ -122,6 +114,7 @@ EFI_STATUS #define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002 #define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG 0x0004 #define EFI_USB_HC_RESET_HOST_WITH_DEBUG 0x0008 + /** Provides software reset for the USB host controller. @@ -200,7 +193,7 @@ EFI_STATUS (EFIAPI *EFI_USB2_HC_PROTOCOL_GET_STATE)( IN EFI_USB2_HC_PROTOCOL *This, OUT EFI_USB_HC_STATE *State -); + ); /** Sets the USB host controller to a specific state. @@ -266,7 +259,7 @@ EFI_STATUS OUT UINT32 *TransferResult ); -#define EFI_USB_MAX_BULK_BUFFER_NUM 10 +#define EFI_USB_MAX_BULK_BUFFER_NUM 10 /** Submits bulk transfer to a bulk endpoint of a USB device. @@ -409,8 +402,8 @@ EFI_STATUS OUT UINT32 *TransferResult ); -#define EFI_USB_MAX_ISO_BUFFER_NUM 7 -#define EFI_USB_MAX_ISO_BUFFER_NUM1 2 +#define EFI_USB_MAX_ISO_BUFFER_NUM 7 +#define EFI_USB_MAX_ISO_BUFFER_NUM1 2 /** Submits isochronous transfer to an isochronous endpoint of a USB device. @@ -632,35 +625,35 @@ EFI_STATUS /// instance, and an EFI_USB2_HC_PROTOCOL instance. /// struct _EFI_USB2_HC_PROTOCOL { - EFI_USB2_HC_PROTOCOL_GET_CAPABILITY GetCapability; - EFI_USB2_HC_PROTOCOL_RESET Reset; - EFI_USB2_HC_PROTOCOL_GET_STATE GetState; - EFI_USB2_HC_PROTOCOL_SET_STATE SetState; - EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer; - EFI_USB2_HC_PROTOCOL_BULK_TRANSFER BulkTransfer; - EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer; - EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer; - EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer; - EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer; - EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus; - EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature; - EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature; + EFI_USB2_HC_PROTOCOL_GET_CAPABILITY GetCapability; + EFI_USB2_HC_PROTOCOL_RESET Reset; + EFI_USB2_HC_PROTOCOL_GET_STATE GetState; + EFI_USB2_HC_PROTOCOL_SET_STATE SetState; + EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer; + EFI_USB2_HC_PROTOCOL_BULK_TRANSFER BulkTransfer; + EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer; + EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer; + EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer; + EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer; + EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus; + EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature; + EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature; /// /// The major revision number of the USB host controller. The revision information /// indicates the release of the Universal Serial Bus Specification with which the /// host controller is compliant. /// - UINT16 MajorRevision; + UINT16 MajorRevision; /// /// The minor revision number of the USB host controller. The revision information /// indicates the release of the Universal Serial Bus Specification with which the /// host controller is compliant. /// - UINT16 MinorRevision; + UINT16 MinorRevision; }; -extern EFI_GUID gEfiUsb2HcProtocolGuid; +extern EFI_GUID gEfiUsb2HcProtocolGuid; #endif |