diff options
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h | 2 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf | 5 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h | 1 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf | 4 | ||||
-rw-r--r-- | MdeModulePkg/MdeModulePkg.dec | 1 |
7 files changed, 17 insertions, 4 deletions
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c index 949aa04..0f711e1 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c @@ -1580,7 +1580,9 @@ EhcDriverBindingStart ( // Robustnesss improvement such as for UoL
// Default is not required.
//
- // EhcClearLegacySupport (Ehc);
+ if (FeaturePcdGet (PcdUsbLegacySupport)) {
+ EhcClearLegacySupport (Ehc);
+ }
EhcResetHC (Ehc, EHC_RESET_TIMEOUT);
Status = EhcInitHC (Ehc);
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h index 50a3f1c..94e415e 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h @@ -36,7 +36,7 @@ Revision History #include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
-
+#include <Library/PcdLib.h>
#include <IndustryStandard/Pci22.h>
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf index 5534bc8..423a042 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf @@ -49,7 +49,10 @@ [Packages]
MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+[FeaturePcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdUsbLegacySupport
[LibraryClasses]
MemoryAllocationLib
@@ -59,7 +62,7 @@ UefiDriverEntryPoint
BaseMemoryLib
DebugLib
-
+ PcdLib
[Protocols]
gEfiPciIoProtocolGuid # PROTOCOL ALWAYS_CONSUMED
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c index 0fc633d..f0aedc7 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c +++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c @@ -1658,7 +1658,9 @@ UhciDriverBindingStart ( // Robustnesss improvement such as for UoL
// Default is not required.
//
- // UhciTurnOffUsbEmulation (PciIo);
+ if (FeaturePcdGet (PcdUsbLegacySupport)) {
+ UhciTurnOffUsbEmulation (PciIo);
+ }
Status = PciIo->Attributes (
PciIo,
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h index d0aea61..73f9fe2 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h +++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h @@ -39,6 +39,7 @@ Revision History #include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
+#include <Library/PcdLib.h>
#include <IndustryStandard/Pci22.h>
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf b/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf index 4f46bf5..818ff6d 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf +++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf @@ -49,7 +49,10 @@ [Packages]
MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+[FeaturePcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdUsbLegacySupport
[LibraryClasses]
MemoryAllocationLib
@@ -59,6 +62,7 @@ UefiDriverEntryPoint
BaseMemoryLib
DebugLib
+ PcdLib
[Protocols]
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 44ab3f9..78f298a 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -128,6 +128,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst|TRUE|BOOLEAN|0x00010044
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportHardwareErrorRecord|FALSE|BOOLEAN|0x00010045
gEfiMdeModulePkgTokenSpaceGuid.PcdUgaConsumeSupport|TRUE|BOOLEAN|0x00010046
+ gEfiMdeModulePkgTokenSpaceGuid.PcdUsbLegacySupport|FALSE|BOOLEAN|0x00010047
[PcdsFixedAtBuild.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry|0x08|UINT32|0x0001000f
|