]> git.proxmox.com Git - mirror_edk2.git/commitdiff
[Description]:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 17 Apr 2008 11:02:59 +0000 (11:02 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 17 Apr 2008 11:02:59 +0000 (11:02 +0000)
  Add a feature flag in Uhci & Ehci to disable legacy USB SMI.
[Impaction]:
  Platform integrator can choose to legacy USB SMI or not.
[Reference Info]
  EDK Tracker 1082

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5081 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h
MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
MdeModulePkg/MdeModulePkg.dec

index 949aa0496a4f4e7826245f5d743676bed95aa9ef..0f711e1a0b2f65ebd971021fdc9e3aeca3e622e2 100644 (file)
@@ -1580,7 +1580,9 @@ EhcDriverBindingStart (
   // Robustnesss improvement such as for UoL\r
   // Default is not required.\r
   //\r
-  // EhcClearLegacySupport (Ehc);\r
+  if (FeaturePcdGet (PcdUsbLegacySupport)) {\r
+    EhcClearLegacySupport (Ehc);\r
+  }\r
   EhcResetHC (Ehc, EHC_RESET_TIMEOUT);\r
 \r
   Status = EhcInitHC (Ehc);\r
index 50a3f1c69893d7eae0601a1b1a39ede248d531cc..94e415e2a55d705addf820520aac4e0cb5f226a7 100644 (file)
@@ -36,7 +36,7 @@ Revision History
 #include <Library/UefiLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
-\r
+#include <Library/PcdLib.h>\r
 \r
 #include <IndustryStandard/Pci22.h>\r
 \r
index 5534bc8b5c06fec170523690568829c4931b2c95..423a04285fd81239e05da4fe0deb1c2755bedfcd 100644 (file)
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
 \r
+[FeaturePcd]\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdUsbLegacySupport\r
 \r
 [LibraryClasses]\r
   MemoryAllocationLib\r
@@ -59,7 +62,7 @@
   UefiDriverEntryPoint\r
   BaseMemoryLib\r
   DebugLib\r
-\r
+  PcdLib\r
 \r
 [Protocols]\r
   gEfiPciIoProtocolGuid                         # PROTOCOL ALWAYS_CONSUMED\r
index 0fc633d8bbfaeb5ce91785b0d213a88debb26ed5..f0aedc753fe1e50bb3b87739aa37ce9fe0974c35 100644 (file)
@@ -1658,7 +1658,9 @@ UhciDriverBindingStart (
   // Robustnesss improvement such as for UoL\r
   // Default is not required.\r
   //\r
-  // UhciTurnOffUsbEmulation (PciIo);\r
+  if (FeaturePcdGet (PcdUsbLegacySupport)) {\r
+    UhciTurnOffUsbEmulation (PciIo);\r
+  }\r
 \r
   Status = PciIo->Attributes (\r
                     PciIo,\r
index d0aea616f595a078197a6520c9f037c2c6e18e58..73f9fe2c0fc76f5dfe1b2ad31205a8ec3ec4f88e 100644 (file)
@@ -39,6 +39,7 @@ Revision History
 #include <Library/UefiLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
+#include <Library/PcdLib.h>\r
 \r
 #include <IndustryStandard/Pci22.h>\r
 \r
index 4f46bf5bb1410c6395d71e7813fde1aaa061929d..818ff6dadec973cd7ae09ddb62e5f6e4a76f09c1 100644 (file)
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
 \r
+[FeaturePcd]\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdUsbLegacySupport\r
 \r
 [LibraryClasses]\r
   MemoryAllocationLib\r
@@ -59,6 +62,7 @@
   UefiDriverEntryPoint\r
   BaseMemoryLib\r
   DebugLib\r
+  PcdLib\r
 \r
 \r
 [Protocols]\r
index 44ab3f987b6cb6bd8f29e190d1d8df6ffdb7e0fa..78f298ac60c104276ace083b22a7b9082e4fc78c 100644 (file)
   gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst|TRUE|BOOLEAN|0x00010044\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdSupportHardwareErrorRecord|FALSE|BOOLEAN|0x00010045\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdUgaConsumeSupport|TRUE|BOOLEAN|0x00010046\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdUsbLegacySupport|FALSE|BOOLEAN|0x00010047\r
 \r
 [PcdsFixedAtBuild.common]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry|0x08|UINT32|0x0001000f\r