From nobody Sat Nov 2 08:27:50 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 149439951005143.089882110725284; Tue, 9 May 2017 23:58:30 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 1E67121A134AC; Tue, 9 May 2017 23:58:28 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0695721A1349E for ; Tue, 9 May 2017 23:58:25 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP; 09 May 2017 23:58:25 -0700 Received: from shwdeopenpsi011.ccr.corp.intel.com (HELO SHWDEOPENPSI011.local) ([10.239.9.12]) by FMSMGA003.fm.intel.com with SMTP; 09 May 2017 23:58:25 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,318,1491289200"; d="scan'208";a="855062395" Date: Wen, 10 May 2017 14:58:25 +0800 From: lushifex To: edk2-devel@lists.01.org Message-ID: <01f727dc-461b-4bef-bdbe-8c2c4554f215@SHWDEOPENPSI011.local> X-Mailer: TortoiseGit MIME-Version: 1.0 Subject: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3] Fixed reconnect -r issue. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: , david.wei@intel.com Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" System will hang up when run reconnect -r with SD Card insert. Reviewed-by: zwei4 =20 --- .../PlatformSettings/PlatformDxe/PciDevice.c | 33 ++++++++++++++++++= +++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDx= e/PciDevice.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/Platfor= mDxe/PciDevice.c index b8645a2..421ac10 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PciDe= vice.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformDxe/PciDe= vice.c @@ -1,7 +1,7 @@ /** @file Platform PCI Bus Initialization Driver. =20 - Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.
=20 This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -405,6 +405,8 @@ PciBusEvent ( UINTN Index; UINT8 mCacheLineSize =3D 0x10; UINTN Seg, Bus, Dev, Fun; + UINT32 AcpiIoPortBaseAddr; + UINT32 CmdValue; =20 while (TRUE) { BufferSize =3D sizeof (EFI_HANDLE); @@ -448,6 +450,35 @@ PciBusEvent ( // Status =3D PciIo->GetLocation (PciIo, &Seg, &Bus, &Dev, &Fun); if ((Seg =3D=3D0) && (Bus =3D=3D 0) && (Dev =3D=3D 13) && (Fun =3D= =3D 1)) { + // + // Set PMC acpi io port address + // =20 + AcpiIoPortBaseAddr =3D (UINT32) PcdGet16 (PcdScAcpiIoPortBaseAddre= ss); + PciIo->Pci.Write ( + PciIo, + EfiPciIoWidthUint32, + 0x20, + 1, + &AcpiIoPortBaseAddr + ); + + PciIo->Pci.Read ( + PciIo, + EfiPciIoWidthUint8, + PCI_COMMAND_OFFSET, + 1, + &CmdValue + ); + + CmdValue |=3D BIT0; + PciIo->Pci.Write ( + PciIo, + EfiPciIoWidthUint8, + PCI_COMMAND_OFFSET, + 1, + &CmdValue + );=09 +=09 Supports |=3D BIT0; } // --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel