public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Alan Ott <alan@softiron.com>
To: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org
Cc: edk2-devel@lists.01.org, linaro-uefi@lists.linaro.org,
	Alan Ott <alan@softiron.com>
Subject: [PATCH edk2-platforms 1/2] Silicon/AMD/Styx: Make PcdSataPortMode 32 bits
Date: Sat, 19 Aug 2017 17:41:13 -0400	[thread overview]
Message-ID: <20170819214114.8140-2-alan@softiron.com> (raw)
In-Reply-To: <20170819214114.8140-1-alan@softiron.com>

Extra bits are needed to accomodate all 14 SATA ports

Signed-off-by: Alan Ott <alan@softiron.com>
Contributed-under: TianoCore Contribution Agreement 1.0
---
 Silicon/AMD/Styx/AmdStyx.dec                                  | 2 +-
 Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Silicon/AMD/Styx/AmdStyx.dec b/Silicon/AMD/Styx/AmdStyx.dec
index ddd5bf4..c6eebe6 100644
--- a/Silicon/AMD/Styx/AmdStyx.dec
+++ b/Silicon/AMD/Styx/AmdStyx.dec
@@ -54,7 +54,7 @@
   gAmdStyxTokenSpaceGuid.PcdSata0CtrlAxiSlvPort|0xE0300000|UINT32|0x00020000
   gAmdStyxTokenSpaceGuid.PcdSata0PortCount|8|UINT8|0x00020001
   gAmdStyxTokenSpaceGuid.PcdSataPi|0xFF|UINT32|0x00020002
-  gAmdStyxTokenSpaceGuid.PcdSataPortMode|0|UINT16|0x00020003
+  gAmdStyxTokenSpaceGuid.PcdSataPortMode|0|UINT32|0x00020003
   gAmdStyxTokenSpaceGuid.PcdSataPortMpsp|TRUE|BOOLEAN|0x00020004
   gAmdStyxTokenSpaceGuid.PcdSataSmpsSupport|FALSE|BOOLEAN|0x00020005
   gAmdStyxTokenSpaceGuid.PcdSataSssSupport|TRUE|BOOLEAN|0x00020006
diff --git a/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c b/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c
index 1958d91..78c6819 100644
--- a/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c
+++ b/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c
@@ -110,8 +110,8 @@ InitializeSataController (
   SataChPerSerdes = FixedPcdGet8 (PcdSataNumChPerSerdes);
 
   for (PortNum = 0; PortNum < SataPortCount; PortNum += SataChPerSerdes) {
-    EvenPort = (UINT32)(FixedPcdGet16 (PcdSataPortMode) >> (PortNum * 2)) & 3;
-    OddPort = (UINT32)(FixedPcdGet16 (PcdSataPortMode) >> ((PortNum+1) * 2)) & 3;
+    EvenPort = (UINT32)(FixedPcdGet32 (PcdSataPortMode) >> (PortNum * 2)) & 3;
+    OddPort = (UINT32)(FixedPcdGet32 (PcdSataPortMode) >> ((PortNum+1) * 2)) & 3;
     SataPhyInit ((StartPort + PortNum) / SataChPerSerdes, EvenPort, OddPort);
   }
 
-- 
2.9.3



  reply	other threads:[~2017-08-19 21:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-19 21:41 [PATCH edk2-platforms 0/2] Re-enable the second SATA controller on Overdrive Alan Ott
2017-08-19 21:41 ` Alan Ott [this message]
2017-08-20 17:46   ` [PATCH edk2-platforms 1/2] Silicon/AMD/Styx: Make PcdSataPortMode 32 bits Ard Biesheuvel
2017-08-20 18:08     ` Alan Ott
2017-08-20 18:09       ` Ard Biesheuvel
2017-08-20 18:11         ` Ard Biesheuvel
2017-08-19 21:41 ` [PATCH edk2-platforms 2/2] Platform/AMD/OverdriveBoard: Re-enable the second SATA Controller Alan Ott
2017-08-20 17:46   ` Ard Biesheuvel

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=20170819214114.8140-2-alan@softiron.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