[Linaro-uefi,v3,8/8] Platforms/AMD/Styx: rename SATA PCDs for symmetry

Message ID 1481029532-17057-9-git-send-email-ard.biesheuvel@linaro.org
State Accepted
Commit 0ce014a8b60d7cced27a310b547f22b536621fe0
Headers show

Commit Message

Ard Biesheuvel Dec. 6, 2016, 1:05 p.m.
To match the port 1 counterparts, rename PcdSataCtrlAxiSlvPort to
PcdSata0CtrlAxiSlvPort and PcdSataPortCount to PcdSata0PortCount.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platforms/AMD/Styx/AmdStyx.dec                                         |  4 ++--
 Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc                           |  2 +-
 Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c        | 11 ++++++-----
 Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/StyxSataPlatformDxe.inf |  8 ++++----
 Platforms/AMD/Styx/Overdrive1000Board/Overdrive1000Board.dsc           |  2 +-
 Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc                   |  2 +-
 6 files changed, 15 insertions(+), 14 deletions(-)

Patch

diff --git a/Platforms/AMD/Styx/AmdStyx.dec b/Platforms/AMD/Styx/AmdStyx.dec
index 3466d1e3cd61..6624f8ca74a7 100644
--- a/Platforms/AMD/Styx/AmdStyx.dec
+++ b/Platforms/AMD/Styx/AmdStyx.dec
@@ -50,8 +50,8 @@ 
   gAmdStyxTokenSpaceGuid.PcdStyxFdt|{ 0xe4, 0x08, 0x0d, 0x04, 0x9a, 0x47, 0x4b, 0x42, 0x8c, 0x42, 0x36, 0x64, 0xdf, 0x79, 0x3f, 0x4b }|VOID*|0x00010000
 
   # Synopsys SATA Controller
-  gAmdStyxTokenSpaceGuid.PcdSataCtrlAxiSlvPort|0xE0300000|UINT32|0x00020000
-  gAmdStyxTokenSpaceGuid.PcdSataPortCount|8|UINT8|0x00020001
+  gAmdStyxTokenSpaceGuid.PcdSata0CtrlAxiSlvPort|0xE0300000|UINT32|0x00020000
+  gAmdStyxTokenSpaceGuid.PcdSata0PortCount|8|UINT8|0x00020001
   gAmdStyxTokenSpaceGuid.PcdSataPi|0xFF|UINT32|0x00020002
   gAmdStyxTokenSpaceGuid.PcdSataPortMode|0|UINT16|0x00020003
   gAmdStyxTokenSpaceGuid.PcdSataPortMpsp|TRUE|BOOLEAN|0x00020004
diff --git a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc
index 0e97cb6f97b1..2606a0b6a552 100644
--- a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc
+++ b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc
@@ -405,7 +405,7 @@  DEFINE DO_KCS    = 0
   #
   # Cello has 2 SATA ports on the first controller.
   #
-  gAmdStyxTokenSpaceGuid.PcdSataPortCount|2
+  gAmdStyxTokenSpaceGuid.PcdSata0PortCount|2
   gAmdStyxTokenSpaceGuid.PcdSata1PortCount|0
 
   # PCIe Support
diff --git a/Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c b/Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c
index e199202d677e..5c651ed5246d 100644
--- a/Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c
+++ b/Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c
@@ -152,19 +152,19 @@  StyxSataPlatformDxeEntryPoint (
   //
   // Perform SATA workarounds
   //
-  for (PortNum = 0; PortNum < FixedPcdGet8(PcdSataPortCount); PortNum++) {
+  for (PortNum = 0; PortNum < FixedPcdGet8(PcdSata0PortCount); PortNum++) {
       SetCwMinSata0 (PortNum);
   }
 
-  Status = InitializeSataController (FixedPcdGet32(PcdSataCtrlAxiSlvPort),
-             FixedPcdGet8(PcdSataPortCount), 0);
+  Status = InitializeSataController (FixedPcdGet32(PcdSata0CtrlAxiSlvPort),
+             FixedPcdGet8(PcdSata0PortCount), 0);
   if (EFI_ERROR (Status)) {
     DEBUG ((DEBUG_WARN, "%a: failed to initialize primary SATA controller!\n",
       __FUNCTION__));
     return Status;
   }
 
-  for (PortNum = 0; PortNum < FixedPcdGet8(PcdSataPortCount); PortNum++) {
+  for (PortNum = 0; PortNum < FixedPcdGet8(PcdSata0PortCount); PortNum++) {
       SetPrdSingleSata0 (PortNum);
   }
 
@@ -174,7 +174,8 @@  StyxSataPlatformDxeEntryPoint (
     }
 
     Status = InitializeSataController (FixedPcdGet32(PcdSata1CtrlAxiSlvPort),
-               FixedPcdGet8(PcdSata1PortCount), FixedPcdGet8(PcdSataPortCount));
+               FixedPcdGet8(PcdSata1PortCount),
+               FixedPcdGet8(PcdSata0PortCount));
     if (EFI_ERROR (Status)) {
       DEBUG ((DEBUG_WARN, "%a: failed to initialize secondary SATA controller!\n",
         __FUNCTION__));
diff --git a/Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/StyxSataPlatformDxe.inf b/Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/StyxSataPlatformDxe.inf
index e6f112adac69..b478fa5d037f 100644
--- a/Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/StyxSataPlatformDxe.inf
+++ b/Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/StyxSataPlatformDxe.inf
@@ -46,15 +46,15 @@ 
   gAmdModulePkgTokenSpaceGuid.PcdSataSerdesOffset
   gAmdModulePkgTokenSpaceGuid.PcdSataNumChPerSerdes
 
-  gAmdStyxTokenSpaceGuid.PcdSataCtrlAxiSlvPort
-  gAmdStyxTokenSpaceGuid.PcdSataPortCount
+  gAmdStyxTokenSpaceGuid.PcdSata0CtrlAxiSlvPort
+  gAmdStyxTokenSpaceGuid.PcdSata0PortCount
+  gAmdStyxTokenSpaceGuid.PcdSata1CtrlAxiSlvPort
+  gAmdStyxTokenSpaceGuid.PcdSata1PortCount
   gAmdStyxTokenSpaceGuid.PcdSataPortMode
   gAmdStyxTokenSpaceGuid.PcdSataSmpsSupport
   gAmdStyxTokenSpaceGuid.PcdSataSssSupport
   gAmdStyxTokenSpaceGuid.PcdSataPortCpd
   gAmdStyxTokenSpaceGuid.PcdSataPortMpsp
-  gAmdStyxTokenSpaceGuid.PcdSata1CtrlAxiSlvPort
-  gAmdStyxTokenSpaceGuid.PcdSata1PortCount
 
 [Depex]
   TRUE
diff --git a/Platforms/AMD/Styx/Overdrive1000Board/Overdrive1000Board.dsc b/Platforms/AMD/Styx/Overdrive1000Board/Overdrive1000Board.dsc
index e093c62f9716..4f90f942b093 100644
--- a/Platforms/AMD/Styx/Overdrive1000Board/Overdrive1000Board.dsc
+++ b/Platforms/AMD/Styx/Overdrive1000Board/Overdrive1000Board.dsc
@@ -410,7 +410,7 @@  DEFINE DO_KCS       = 1
   #
   # 2 ports active on Overdrive 1000
   #
-  gAmdStyxTokenSpaceGuid.PcdSataPortCount|2
+  gAmdStyxTokenSpaceGuid.PcdSata0PortCount|2
   gAmdStyxTokenSpaceGuid.PcdSata1PortCount|0
 
   # PCIe Support
diff --git a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
index bd91831ce71f..c7bf241fdc99 100644
--- a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
@@ -412,7 +412,7 @@  DEFINE DO_KCS       = 1
   #
   # Overdrive B1 has 14 SATA ports across 2 controllers.
   #
-  gAmdStyxTokenSpaceGuid.PcdSataPortCount|8
+  gAmdStyxTokenSpaceGuid.PcdSata0PortCount|8
   gAmdStyxTokenSpaceGuid.PcdSata1PortCount|6
 
   # PCIe Support