diff options
author | erictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-16 10:24:47 +0000 |
---|---|---|
committer | erictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-16 10:24:47 +0000 |
commit | f01219e875c68e045f1bc755390f5e238ba5a4ad (patch) | |
tree | 760b8e1c6284ea17a54d92f7b2c047fc492435c3 /MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c | |
parent | 96aace827e120bd6f3d947360d71795e14842508 (diff) | |
download | edk2-platforms-f01219e875c68e045f1bc755390f5e238ba5a4ad.tar.xz |
MdeModulePkg: Enable port power if port power control feature is supported by EHCI
signed-off-by: erictian
reviewed-by: li-elvin
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12725 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c')
-rw-r--r-- | MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c index 77aba643ab..c141803c38 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c @@ -469,9 +469,12 @@ EhcSetRootHubPortFeature ( case EfiUsbPortPower:
//
- // Not supported, ignore the operation
+ // Set port power bit when PPC is 1
//
- Status = EFI_SUCCESS;
+ if ((Ehc->HcCapParams & HCSP_PPC) == HCSP_PPC) {
+ State |= PORTSC_POWER;
+ EhcWriteOpReg (Ehc, Offset, State);
+ }
break;
case EfiUsbPortOwner:
@@ -598,6 +601,14 @@ EhcClearRootHubPortFeature ( break;
case EfiUsbPortPower:
+ //
+ // Clear port power bit when PPC is 1
+ //
+ if ((Ehc->HcCapParams & HCSP_PPC) == HCSP_PPC) {
+ State &= ~PORTSC_POWER;
+ EhcWriteOpReg (Ehc, Offset, State);
+ }
+ break;
case EfiUsbPortSuspendChange:
case EfiUsbPortResetChange:
//
|