[Linaro-uefi,v2,06/10] Platforms/AMD/Cello: add device tree support

Message ID 20170627132145.28159-7-ard.biesheuvel@linaro.org
State Accepted
Commit 6b658425ea7a9f555bf70916ae7006b796a47c8b
Headers show
Series
  • Platforms/AMD/Styx: various Cello related fixes
Related show

Commit Message

Ard Biesheuvel June 27, 2017, 1:21 p.m.
Now that we have the ability to switch between ACPI and DT support in
the UEFI setup menu, let's add DT support to Cello as well. The change
is trivial, and it improves the utility of this board for development.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc | 15 ++++++++++++++-
 Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf |  9 +++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)

Comments

Leif Lindholm June 27, 2017, 4:14 p.m. | #1
On Tue, Jun 27, 2017 at 01:21:41PM +0000, Ard Biesheuvel wrote:
> Now that we have the ability to switch between ACPI and DT support in
> the UEFI setup menu, let's add DT support to Cello as well. The change
> is trivial, and it improves the utility of this board for development.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Yeah, fair enough. It feels a little weird to include the Overdrive
.dtb directly, but there's also a limit to how much re-engineering a
limited-run board should be given.

Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

> ---
>  Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc | 15 ++++++++++++++-
>  Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf |  9 +++++++++
>  2 files changed, 23 insertions(+), 1 deletion(-)
> 
> diff --git a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc
> index 2eec9131a8a8..2b041192c887 100644
> --- a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc
> +++ b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc
> @@ -558,6 +558,15 @@ DEFINE DO_KCS    = 0
>    AmdModulePkg/Iscp/IscpDxe.inf
>  
>    #
> +  # FDT support
> +  #
> +  EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf {
> +    <LibraryClasses>
> +      FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
> +      DtPlatformDtbLoaderLib|OpenPlatformPkg/Platforms/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf
> +  }
> +
> +  #
>    # PCI support
>    #
>    AmdModulePkg/Gionb/Gionb.inf
> @@ -610,7 +619,11 @@ DEFINE DO_KCS    = 0
>    #
>    # ACPI Support
>    #
> -  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
> +  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf {
> +    <LibraryClasses>
> +      NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf
> +  }
> +
>    OpenPlatformPkg/Platforms/AMD/Styx/AcpiTables/AcpiAml.inf
>    OpenPlatformPkg/Platforms/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
>  
> diff --git a/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf b/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf
> index 29103531a224..6f7428f0c4ca 100644
> --- a/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf
> +++ b/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf
> @@ -139,6 +139,15 @@ READ_LOCK_STATUS   = TRUE
>    INF AmdModulePkg/Iscp/IscpDxe.inf
>  
>    #
> +  # FDT support
> +  #
> +  INF EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf
> +
> +  FILE FREEFORM = 25462CDA-221F-47DF-AC1D-259CFAA4E326 {
> +    SECTION RAW = OpenPlatformPkg/Platforms/AMD/Styx/OverdriveBoard/FdtBlob/styx-overdrive.dtb
> +  }
> +
> +  #
>    # PCI support
>    #
>    INF AmdModulePkg/Gionb/Gionb.inf
> -- 
> 2.9.3
>

Patch

diff --git a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc
index 2eec9131a8a8..2b041192c887 100644
--- a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc
+++ b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc
@@ -558,6 +558,15 @@  DEFINE DO_KCS    = 0
   AmdModulePkg/Iscp/IscpDxe.inf
 
   #
+  # FDT support
+  #
+  EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf {
+    <LibraryClasses>
+      FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
+      DtPlatformDtbLoaderLib|OpenPlatformPkg/Platforms/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf
+  }
+
+  #
   # PCI support
   #
   AmdModulePkg/Gionb/Gionb.inf
@@ -610,7 +619,11 @@  DEFINE DO_KCS    = 0
   #
   # ACPI Support
   #
-  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
+  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf {
+    <LibraryClasses>
+      NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf
+  }
+
   OpenPlatformPkg/Platforms/AMD/Styx/AcpiTables/AcpiAml.inf
   OpenPlatformPkg/Platforms/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf
 
diff --git a/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf b/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf
index 29103531a224..6f7428f0c4ca 100644
--- a/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf
+++ b/Platforms/AMD/Styx/CelloBoard/CelloBoard.fdf
@@ -139,6 +139,15 @@  READ_LOCK_STATUS   = TRUE
   INF AmdModulePkg/Iscp/IscpDxe.inf
 
   #
+  # FDT support
+  #
+  INF EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf
+
+  FILE FREEFORM = 25462CDA-221F-47DF-AC1D-259CFAA4E326 {
+    SECTION RAW = OpenPlatformPkg/Platforms/AMD/Styx/OverdriveBoard/FdtBlob/styx-overdrive.dtb
+  }
+
+  #
   # PCI support
   #
   INF AmdModulePkg/Gionb/Gionb.inf