]> 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 1b1245cb8b15c8a6baa368d084c40f8cc9756703..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
@@ -430,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