diff mbox

[Linaro-uefi,3/8] Platforms/AMD/Overdrive: switch to generic AHCI driver

Message ID 1478021115-22781-4-git-send-email-ard.biesheuvel@linaro.org
State Superseded
Headers show

Commit Message

Ard Biesheuvel Nov. 1, 2016, 5:25 p.m. UTC
Switch to the new Styx platform SATA driver, which allows the generic
platform PCI I/O emulation driver and the generic AHCI driver to be used.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc | 11 +++++++----
 Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf |  4 +++-
 2 files changed, 10 insertions(+), 5 deletions(-)

Comments

Leif Lindholm Nov. 2, 2016, 4:49 p.m. UTC | #1
On Tue, Nov 01, 2016 at 05:25:10PM +0000, Ard Biesheuvel wrote:
> Switch to the new Styx platform SATA driver, which allows the generic
> platform PCI I/O emulation driver and the generic AHCI driver to be used.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Not tested, but:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

> ---
>  Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc | 11 +++++++----
>  Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf |  4 +++-
>  2 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
> index 70b94df7d6da..510a3ebe19a2 100644
> --- a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
> +++ b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
> @@ -217,6 +217,7 @@ DEFINE DO_KCS       = 1
>    SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
>    PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
>    MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
> +  PlatformPciIoDeviceRegistrationLib|EmbeddedPkg/Library/PlatformPciIoDeviceRegistrationLib/PlatformPciIoDeviceRegistrationLib.inf
>  
>  [LibraryClasses.common.DXE_RUNTIME_DRIVER]
>    HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> @@ -409,10 +410,10 @@ DEFINE DO_KCS       = 1
>    gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|187500000
>  
>    #
> -  # Bitmask for ports implemented on the SATA controller
> -  # (enabling 4 ports by default: 00001111b)
> +  # Overdrive B1 has 14 SATA ports across 2 controllers.
>    #
> -  gAmdStyxTokenSpaceGuid.PcdSataPi|0x0F
> +  gAmdStyxTokenSpaceGuid.PcdSataPortCount|8
> +  gAmdStyxTokenSpaceGuid.PcdSata1PortCount|6
>  
>    # PCIe Support
>    gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xF0000000
> @@ -606,7 +607,9 @@ DEFINE DO_KCS       = 1
>    MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
>    MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
>    MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
> -  OpenPlatformPkg/Platforms/AMD/Styx/Drivers/SataControllerDxe/SataControllerDxe.inf
> +  MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf
> +  EmbeddedPkg/Drivers/PlatformPciIoDxe/PlatformPciIoDxe.inf
> +  OpenPlatformPkg/Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/StyxSataPlatformDxe.inf
>  
>    #
>    # USB Support
> diff --git a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf
> index 404810f8831d..17f5d691491f 100644
> --- a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf
> +++ b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf
> @@ -162,7 +162,9 @@ READ_LOCK_STATUS   = TRUE
>    INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
>    INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
>    INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
> -  INF OpenPlatformPkg/Platforms/AMD/Styx/Drivers/SataControllerDxe/SataControllerDxe.inf
> +  INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf
> +  INF EmbeddedPkg/Drivers/PlatformPciIoDxe/PlatformPciIoDxe.inf
> +  INF OpenPlatformPkg/Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/StyxSataPlatformDxe.inf
>  
>    #
>    # USB Support
> -- 
> 2.7.4
>
diff mbox

Patch

diff --git a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
index 70b94df7d6da..510a3ebe19a2 100644
--- a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
@@ -217,6 +217,7 @@  DEFINE DO_KCS       = 1
   SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
+  PlatformPciIoDeviceRegistrationLib|EmbeddedPkg/Library/PlatformPciIoDeviceRegistrationLib/PlatformPciIoDeviceRegistrationLib.inf
 
 [LibraryClasses.common.DXE_RUNTIME_DRIVER]
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
@@ -409,10 +410,10 @@  DEFINE DO_KCS       = 1
   gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|187500000
 
   #
-  # Bitmask for ports implemented on the SATA controller
-  # (enabling 4 ports by default: 00001111b)
+  # Overdrive B1 has 14 SATA ports across 2 controllers.
   #
-  gAmdStyxTokenSpaceGuid.PcdSataPi|0x0F
+  gAmdStyxTokenSpaceGuid.PcdSataPortCount|8
+  gAmdStyxTokenSpaceGuid.PcdSata1PortCount|6
 
   # PCIe Support
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xF0000000
@@ -606,7 +607,9 @@  DEFINE DO_KCS       = 1
   MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
   MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
   MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
-  OpenPlatformPkg/Platforms/AMD/Styx/Drivers/SataControllerDxe/SataControllerDxe.inf
+  MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf
+  EmbeddedPkg/Drivers/PlatformPciIoDxe/PlatformPciIoDxe.inf
+  OpenPlatformPkg/Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/StyxSataPlatformDxe.inf
 
   #
   # USB Support
diff --git a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf
index 404810f8831d..17f5d691491f 100644
--- a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf
+++ b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.fdf
@@ -162,7 +162,9 @@  READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
   INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
   INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
-  INF OpenPlatformPkg/Platforms/AMD/Styx/Drivers/SataControllerDxe/SataControllerDxe.inf
+  INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf
+  INF EmbeddedPkg/Drivers/PlatformPciIoDxe/PlatformPciIoDxe.inf
+  INF OpenPlatformPkg/Platforms/AMD/Styx/Drivers/StyxSataPlatformDxe/StyxSataPlatformDxe.inf
 
   #
   # USB Support