]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
MdeModulePkg UhciPei: Remove redundant functions
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / EhciDxe / Ehci.h
index f8d5444c38d3a6c86700f99fc6b28da007842fb2..f7556754f8ead8399221a5a6227d4edf934f304f 100644 (file)
@@ -2,7 +2,7 @@
 \r
   Provides some data struct used by EHCI controller driver.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -32,6 +32,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/BaseLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/PcdLib.h>\r
+#include <Library/ReportStatusCodeLib.h>\r
 \r
 #include <IndustryStandard/Pci.h>\r
 \r
@@ -65,25 +66,32 @@ typedef struct _USB2_HC_DEV  USB2_HC_DEV;
 \r
 //\r
 // Sync and Async transfer polling interval, set by experience,\r
-// and the unit of Async is 100us, means 50ms as interval.\r
+// and the unit of Async is 100us, means 1ms as interval.\r
 //\r
 #define EHC_SYNC_POLL_INTERVAL       (1 * EHC_1_MILLISECOND)\r
-#define EHC_ASYNC_POLL_INTERVAL      (50 * 10000U)\r
+#define EHC_ASYNC_POLL_INTERVAL      EFI_TIMER_PERIOD_MILLISECONDS(1)\r
+\r
+//\r
+// EHCI debug port control status register bit definition\r
+//\r
+#define USB_DEBUG_PORT_IN_USE        BIT10\r
+#define USB_DEBUG_PORT_ENABLE        BIT28\r
+#define USB_DEBUG_PORT_OWNER         BIT30\r
 \r
 //\r
 // EHC raises TPL to TPL_NOTIFY to serialize all its operations\r
 // to protect shared data structures.\r
 //\r
-#define  EHC_TPL                TPL_NOTIFY\r
+#define  EHC_TPL                     TPL_NOTIFY\r
 \r
 //\r
-//Iterate through the doule linked list. NOT delete safe\r
+//Iterate through the double linked list. NOT delete safe\r
 //\r
 #define EFI_LIST_FOR_EACH(Entry, ListHead)    \\r
   for(Entry = (ListHead)->ForwardLink; Entry != (ListHead); Entry = Entry->ForwardLink)\r
 \r
 //\r
-//Iterate through the doule linked list. This is delete-safe.\r
+//Iterate through the double linked list. This is delete-safe.\r
 //Don't touch NextEntry\r
 //\r
 #define EFI_LIST_FOR_EACH_SAFE(Entry, NextEntry, ListHead)            \\r
@@ -108,6 +116,7 @@ struct _USB2_HC_DEV {
   EFI_USB2_HC_PROTOCOL      Usb2Hc;\r
 \r
   EFI_PCI_IO_PROTOCOL       *PciIo;\r
+  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
   UINT64                    OriginalPciAttributes;\r
   USBHC_MEM_POOL            *MemPool;\r
 \r
@@ -124,7 +133,7 @@ struct _USB2_HC_DEV {
   EFI_EVENT                 PollTimer;\r
 \r
   //\r
-  // ExitBootServicesEvent is used to stop the EHC DMA operation \r
+  // ExitBootServicesEvent is used to stop the EHC DMA operation\r
   // after exit boot service.\r
   //\r
   EFI_EVENT                 ExitBootServiceEvent;\r
@@ -137,7 +146,7 @@ struct _USB2_HC_DEV {
   EHC_QH                   *ReclaimHead;\r
 \r
   //\r
-  // Peroidic (interrupt) transfer schedule data:\r
+  // Periodic (interrupt) transfer schedule data:\r
   //\r
   VOID                      *PeriodFrame;     // the buffer pointed by this pointer is used to store pci bus address of the QH descriptor.\r
   VOID                      *PeriodFrameHost; // the buffer pointed by this pointer is used to store host memory address of the QH descriptor.\r
@@ -157,6 +166,15 @@ struct _USB2_HC_DEV {
   // Misc\r
   //\r
   EFI_UNICODE_STRING_TABLE  *ControllerNameTable;\r
+\r
+  //\r
+  // EHCI debug port info\r
+  //\r
+  UINT16                    DebugPortOffset; // The offset of debug port mmio register\r
+  UINT8                     DebugPortBarNum; // The bar number of debug port mmio register\r
+  UINT8                     DebugPortNum;    // The port number of usb debug port\r
+\r
+  BOOLEAN                   Support64BitDma; // Whether 64 bit DMA may be used with this device\r
 };\r
 \r
 \r
@@ -207,7 +225,7 @@ EhcDriverBindingStart (
   );\r
 \r
 /**\r
-  Stop this driver on ControllerHandle. Support stoping any child handles\r
+  Stop this driver on ControllerHandle. Support stopping any child handles\r
   created by this driver.\r
 \r
   @param  This                 Protocol instance pointer.\r