public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [edk2-platforms PATCH 1/1] AmpereAltraPkg/Ac01PcieLib: drop useless link status register read
@ 2023-10-17 10:05 Laszlo Ersek
  2023-10-17 10:06 ` Rebecca Cran via groups.io
  2023-10-17 11:38 ` Nhi Pham via groups.io
  0 siblings, 2 replies; 4+ messages in thread
From: Laszlo Ersek @ 2023-10-17 10:05 UTC (permalink / raw)
  To: devel; +Cc: Chuong Tran, Leif Lindholm, Nhi Pham, Rebecca Cran

Nhi says that reading LINK_CONTROL_LINK_STATUS_REG is redundant; its only
use was debugging (before commit 380b4b40c60d). Thus, we can go farther
than commit 2e27c62ef000, and remove the MmioRead32() call altogether.

Build-tested with "Jade.dsc".

Cc: Chuong Tran <chuong@os.amperecomputing.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Nhi Pham <nhi@os.amperecomputing.com>
Cc: Rebecca Cran <rebecca@os.amperecomputing.com>
Suggested-by: Nhi Pham <nhi@os.amperecomputing.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
index fa00c1e36999..dea2e6406dfd 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
@@ -1744,7 +1744,6 @@ Ac01PcieCoreUpdateLink (
   )
 {
   AC01_PCIE_CONTROLLER      *Pcie;
-  PHYSICAL_ADDRESS          CfgBase;
   UINT8                     PcieIndex;
   UINT32                    Index;
 
@@ -1761,12 +1760,10 @@ Ac01PcieCoreUpdateLink (
   // Loop for all controllers
   for (PcieIndex = 0; PcieIndex < RootComplex->MaxPcieController; PcieIndex++) {
     Pcie = &RootComplex->Pcie[PcieIndex];
-    CfgBase = RootComplex->MmcfgBase + (RootComplex->Pcie[PcieIndex].DevNum << DEV_SHIFT);
 
     if (Pcie->Active && !Pcie->LinkUp) {
       if (PcieLinkUpCheck (Pcie)) {
         Pcie->LinkUp = TRUE;
-        (VOID)MmioRead32 (CfgBase + PCIE_CAPABILITY_BASE + LINK_CONTROL_LINK_STATUS_REG);
 
         // Doing link checking and recovery if needed
         Ac01PcieCoreQoSLinkCheckRecovery (RootComplex, PcieIndex);


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109669): https://edk2.groups.io/g/devel/message/109669
Mute This Topic: https://groups.io/mt/102014532/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-17 11:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-17 10:05 [edk2-devel] [edk2-platforms PATCH 1/1] AmpereAltraPkg/Ac01PcieLib: drop useless link status register read Laszlo Ersek
2023-10-17 10:06 ` Rebecca Cran via groups.io
2023-10-17 11:38 ` Nhi Pham via groups.io
2023-10-17 11:59   ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox