[edk2] [PATCH 2/2] ArmPlatformPkg: Remove DT code when unsupported

evan.lloyd@arm.com posted 2 patches 7 years, 3 months ago
[edk2] [PATCH 2/2] ArmPlatformPkg: Remove DT code when unsupported
Posted by evan.lloyd@arm.com 7 years, 3 months ago
From: Sami Mujawar <sami.mujawar@arm.com>

From the UEFI perspective Device Tree is a non standard extra.
There is, thus, an existing build flag DT_SUPPORTED.
This change removes Device Tree specific code unless DT_SUPPORTED is
set.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
---
 ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
index 456e21ba47db7ec440ac1ef5554eccd5e4d2bcf9..893dd80b6755d68a05b8c2b4dedb8f60401b503b 100644
--- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
+++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
@@ -414,9 +414,11 @@ ArmJunoEntryPoint (
 {
   EFI_STATUS            Status;
   EFI_PHYSICAL_ADDRESS  HypBase;
+#ifdef DT_SUPPORTED
   CHAR16                *TextDevicePath;
   UINTN                 TextDevicePathSize;
   VOID                  *Buffer;
+#endif
   UINT32                JunoRevision;
   EFI_EVENT             EndOfDxeEvent;
 
@@ -530,6 +532,7 @@ ArmJunoEntryPoint (
         );
   }
 
+#ifdef DT_SUPPORTED
   //
   // Set up the device path to the FDT.
   //
@@ -549,6 +552,7 @@ ArmJunoEntryPoint (
       );
     return Status;
   }
+#endif
 
   return Status;
 }
-- 
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel