• Subject: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3] Fixed reconnect -r issue.
  • Author: lushifex
  • Date: May 10, 2017, 6:58 a.m.
  • Patches: 1 / 1
Changeset
.../PlatformSettings/PlatformDxe/PciDevice.c       | 33 +++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
Git apply log
Switched to a new branch '01f727dc-461b-4bef-bdbe-8c2c4554f215@SHWDEOPENPSI011.local'
Applying: Fixed reconnect -r issue.
fatal: sha1 information is lacking or useless (Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PciDevice.c).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Fixed reconnect -r issue.
The copy of the patch that failed is found in:
   /var/tmp/tmpryt81756/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Failed to apply patch:
[edk2] [Patch][edk2-platforms/devel-MinnowBoard3] Fixed reconnect -r issue.
[edk2] [Patch][edk2-platforms/devel-MinnowBoard3] Fixed reconnect -r issue.
Posted by lushifex, 19 weeks ago
System will hang up when run reconnect -r with SD Card insert.
---
 .../PlatformSettings/PlatformDxe/PciDevice.c       | 33 +++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PciDevice.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PciDevice.c
index b8645a2..421ac10 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PciDevice.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PciDevice.c
@@ -1,7 +1,7 @@
 /** @file
   Platform PCI Bus Initialization Driver.
 
-  Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.<BR>
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
@@ -405,6 +405,8 @@ PciBusEvent (
   UINTN                         Index;
   UINT8                         mCacheLineSize = 0x10;
   UINTN                         Seg, Bus, Dev, Fun;
+  UINT32                        AcpiIoPortBaseAddr;
+  UINT32                        CmdValue;
 
   while (TRUE) {
     BufferSize = sizeof (EFI_HANDLE);
@@ -448,6 +450,35 @@ PciBusEvent (
       //
       Status = PciIo->GetLocation (PciIo, &Seg, &Bus, &Dev, &Fun);
       if ((Seg ==0) && (Bus == 0) && (Dev == 13) && (Fun == 1)) {
+        //
+        // Set PMC acpi io port address
+        //        
+        AcpiIoPortBaseAddr = (UINT32) PcdGet16 (PcdScAcpiIoPortBaseAddress);
+        PciIo->Pci.Write (
+                     PciIo,
+                     EfiPciIoWidthUint32,
+                     0x20,
+                     1,
+                     &AcpiIoPortBaseAddr
+                     );
+
+        PciIo->Pci.Read (
+                     PciIo,
+                     EfiPciIoWidthUint8,
+                     PCI_COMMAND_OFFSET,
+                     1,
+                     &CmdValue
+                     );
+
+        CmdValue |= BIT0;
+        PciIo->Pci.Write (
+                     PciIo,
+                     EfiPciIoWidthUint8,
+                     PCI_COMMAND_OFFSET,
+                     1,
+                     &CmdValue
+                     );	
+	
         Supports |= BIT0;
       }
       //
-- 
2.7.0.windows.1


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel