]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/Usb2HostController.h
Keep the C name of SIMPLE TEXT OUTPUT PROTOCOL unchanged for backward-compatible...
[mirror_edk2.git] / MdePkg / Include / Protocol / Usb2HostController.h
index 2a9d02da07ab94009628f51bf46f6a5a067c431e..f45478ac688e39a6d6b68a32efea028344a04033 100644 (file)
@@ -17,6 +17,9 @@
 #ifndef _USB2_HOSTCONTROLLER_H_\r
 #define _USB2_HOSTCONTROLLER_H_\r
 \r
+#include <IndustryStandard/Usb.h>\r
+#include <Protocol/UsbIo.h>\r
+\r
 #define EFI_USB2_HC_PROTOCOL_GUID \\r
   { \\r
     0x3e745226, 0x9818, 0x45b6, {0xa2, 0xac, 0xd7, 0xcd, 0xe, 0x8b, 0xa2, 0xbc } \\r
@@ -91,6 +94,46 @@ EFI_STATUS
   )\r
 ;\r
 \r
+/**\r
+   \r
+  @param EfiUsbHcStateHalt  The host controller is in halt\r
+                            state. No USB transactions can occur\r
+                            while in this state. The host\r
+                            controller can enter this state for\r
+                            three reasons: 1) After host\r
+                            controller hardware reset. 2)\r
+                            Explicitly set by software. 3)\r
+                            Triggered by a fatal error such as\r
+                            consistency check failure.\r
+  \r
+  \r
+  @param EfiUsbHcStateOperational   The host controller is in an\r
+                                    operational state. When in\r
+                                    this state, the host\r
+                                    controller can execute bus\r
+                                    traffic. This state must be\r
+                                    explicitly set to enable the\r
+                                    USB bus traffic.\r
+  \r
+  \r
+  @param EfiUsbHcStateSuspend   The host controller is in the\r
+                                suspend state. No USB\r
+                                transactions can occur while in\r
+                                this state. The host controller\r
+                                enters this state for the\r
+                                following reasons: 1) Explicitly\r
+                                set by software. 2) Triggered\r
+                                when there is no bus traffic for\r
+                                3 microseconds.\r
+  \r
+**/\r
+typedef enum {\r
+  EfiUsbHcStateHalt,\r
+  EfiUsbHcStateOperational,\r
+  EfiUsbHcStateSuspend,\r
+  EfiUsbHcStateMaximum\r
+} EFI_USB_HC_STATE;\r
+\r
 /**\r
   Retrieves current state of the USB host controller.\r
 \r
@@ -101,15 +144,15 @@ EFI_STATUS
   @retval EFI_SUCCESS           The state information of the host controller was returned in State.\r
   @retval EFI_INVALID_PARAMETER State is NULL.\r
   @retval EFI_DEVICE_ERROR      An error was encountered while attempting to retrieve the\r
-                                host controller¡¯s current state.\r
+                                host controller's current state.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_USB2_HC_PROTOCOL_GET_STATE) (\r
-  IN  EFI_USB2_HC_PROTOCOL    *This,\r
-  OUT EFI_USB_HC_STATE        *State\r
-  )\r
+  IN CONST  EFI_USB2_HC_PROTOCOL    *This,\r
+  OUT       EFI_USB_HC_STATE        *State\r
+)\r
 ;  \r
 \r
 /**\r
@@ -229,7 +272,8 @@ EFI_STATUS
 \r
 /**\r
   Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.\r
-\r
+  Translator parameter doesn't exist in UEFI2.0 spec, but it will be updated in the following specification version.\r
+  \r
   @param  This                A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
   @param  DeviceAddress       Represents the address of the target device on the USB.\r
   @param  EndPointAddress     The combination of an endpoint number and an endpoint direction of the\r
@@ -246,6 +290,7 @@ EFI_STATUS
                               transfer is polled.\r
   @param  DataLength          Indicates the length of data to be received at the rate specified by\r
                               PollingInterval from the target asynchronous interrupt endpoint.\r
+  @param  Translator          A pointr to the transaction translator data.\r
   @param  CallBackFunction    The Callback function. This function is called at the rate specified by\r
                               PollingInterval.\r
   @param  Context             The context that is passed to the CallBackFunction. This is an\r
@@ -277,6 +322,7 @@ EFI_STATUS
 \r
 /**\r
   Submits synchronous interrupt transfer to an interrupt endpoint of a USB device.\r
+  Translator parameter doesn't exist in UEFI2.0 spec, but it will be updated in the following specification version.\r
 \r
   @param  This                  A pointer to the EFI_USB2_HC_PROTOCOL instance.\r
   @param  DeviceAddress         Represents the address of the target device on the USB.\r
@@ -292,6 +338,7 @@ EFI_STATUS
   @param  DataToggle            A pointer to the data toggle value.\r
   @param  TimeOut               Indicates the maximum time, in milliseconds, which the transfer is\r
                                 allowed to complete.\r
+  @param  Translator            A pointr to the transaction translator data.\r
   @param  TransferResult        A pointer to the detailed result information from the synchronous\r
                                 interrupt transfer.\r
 \r
@@ -426,9 +473,9 @@ EFI_STATUS
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS) (\r
-  IN EFI_USB2_HC_PROTOCOL    *This,\r
-  IN  UINT8                  PortNumber,\r
-  OUT EFI_USB_PORT_STATUS    *PortStatus\r
+  IN CONST  EFI_USB2_HC_PROTOCOL    *This,\r
+  IN CONST  UINT8                   PortNumber,\r
+  OUT       EFI_USB_PORT_STATUS     *PortStatus\r
   )\r
 ;  \r
 \r