]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h
MdeModulePkg UsbBusPei: Produce a USB I/O PPI for all USB Interfaces a USB Device...
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbBusPei / UsbPeim.h
index c9e75bad53df9cc9eef75e7c933ed400feb8b5a6..4685034a5c711b09dd3fc354cb10bdd3aad1c81b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Usb Peim definition.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved. <BR>\r
   \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -34,6 +34,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <IndustryStandard/Usb.h>\r
 \r
 #define MAX_ROOT_PORT             2\r
+#define MAX_INTERFACE             8\r
 #define MAX_ENDPOINT              16\r
 \r
 #define USB_SLOW_SPEED_DEVICE     0x01\r
@@ -47,17 +48,19 @@ typedef struct {
   UINT8                         DeviceAddress;\r
   UINT8                         MaxPacketSize0;\r
   UINT8                         DeviceSpeed;\r
-  UINT8                         DataToggle;\r
   UINT8                         IsHub;\r
+  UINT16                        DataToggle;\r
   UINT8                         DownStreamPortNo;\r
-  UINT8                         Reserved[2];  // Padding for IPF\r
+  UINT8                         Reserved;  // Padding for IPF\r
   UINTN                         AllocateAddress;\r
   PEI_USB_HOST_CONTROLLER_PPI   *UsbHcPpi;\r
   PEI_USB2_HOST_CONTROLLER_PPI  *Usb2HcPpi;\r
   UINT8                         ConfigurationData[1024];\r
   EFI_USB_CONFIG_DESCRIPTOR     *ConfigDesc;\r
   EFI_USB_INTERFACE_DESCRIPTOR  *InterfaceDesc;\r
+  EFI_USB_INTERFACE_DESCRIPTOR  *InterfaceDescList[MAX_INTERFACE];\r
   EFI_USB_ENDPOINT_DESCRIPTOR   *EndpointDesc[MAX_ENDPOINT];\r
+  EFI_USB_ENDPOINT_DESCRIPTOR   *EndpointDescList[MAX_INTERFACE][MAX_ENDPOINT];\r
   EFI_USB2_HC_TRANSACTION_TRANSLATOR Translator;  \r
 } PEI_USB_DEVICE;\r
 \r
@@ -71,7 +74,9 @@ typedef struct {
   @param  This                   The pointer of PEI_USB_IO_PPI.\r
   @param  Request                USB device request to send.\r
   @param  Direction              Specifies the data direction for the data stage.\r
-  @param  Timeout                Indicates the maximum timeout, in millisecond.\r
+  @param  Timeout                Indicates the maximum timeout, in millisecond. If Timeout\r
+                                 is 0, then the caller must wait for the function to be\r
+                                 completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
   @param  Data                   Data buffer to be transmitted or received from USB device.\r
   @param  DataLength             The size (in bytes) of the data buffer.\r
 \r
@@ -104,7 +109,9 @@ PeiUsbControlTransfer (
                                 from or receive into.\r
   @param  DataLength            The lenght of the data buffer.\r
   @param  Timeout               Indicates the maximum time, in millisecond, which the\r
-                                transfer is allowed to complete.\r
+                                transfer is allowed to complete. If Timeout is 0, then\r
+                                the caller must wait for the function to be completed\r
+                                until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
 \r
   @retval EFI_SUCCESS           The transfer was completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  The transfer failed due to lack of resource.\r