public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wei, David" <david.wei@intel.com>
To: "Lu, ShifeiX A" <shifeix.a.lu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch][edk2-platforms/devel-MinnowBoard3] Fixed reconnect -r issue.
Date: Wed, 10 May 2017 07:53:21 +0000	[thread overview]
Message-ID: <89954A0B46707A448411A627AD4EEE3468F2EF76@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <01f727dc-461b-4bef-bdbe-8c2c4554f215@SHWDEOPENPSI011.local>

Reviewed-by: zwei4  <david.wei@intel.com> 

Thanks,
David  Wei                                 

-----Original Message-----
From: Lu, ShifeiX A 
Sent: Wednesday, May 10, 2017 2:58 PM
To: edk2-devel@lists.01.org
Cc: Wei, David <david.wei@intel.com>
Subject: [Patch][edk2-platforms/devel-MinnowBoard3] Fixed reconnect -r issue.

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




      reply	other threads:[~2017-05-10  7:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10  6:49 [Patch][edk2-platforms/devel-MinnowBoard3] Fixed reconnect -r issue lushifex
2017-05-10  7:53 ` Wei, David [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=89954A0B46707A448411A627AD4EEE3468F2EF76@SHSMSX101.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox