Platforms/ARM: make PL111 build time optional

It defaults to off, so you have to specify -D EDK2_ENABLE_PL111=1 to
enable it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc
index b14aeb0..ab60609 100644
--- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc
+++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.dsc
@@ -45,7 +45,9 @@
 

   ArmPlatformSysConfigLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf

   NorFlashPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/NorFlashArmVExpressLib/NorFlashArmVExpressLib.inf

+!ifdef EDK2_ENABLE_PL111

   LcdPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf

+!endif

 

   TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf

 

@@ -140,8 +142,10 @@
   ## PL031 RealTimeClock

   gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x1C170000

 

+!ifdef EDK2_ENABLE_PL111

   ## PL111 Versatile Express Motherboard controller

   gArmPlatformTokenSpaceGuid.PcdPL111LcdBase|0x1C1F0000

+!endif

 

   ## PL180 MMC/SD card controller

   gArmPlatformTokenSpaceGuid.PcdPL180SysMciRegAddress|0x1C010048

@@ -167,7 +171,11 @@
   gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|L"console=ttyAMA0 earlycon=pl011,0x1c090000 debug user_debug=31 loglevel=9"

 

   # Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)

+!ifdef EDK2_ENABLE_PL111

   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"

+!else

+  gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();"

+!endif

   gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi()"

 

   #

@@ -287,7 +295,9 @@
   ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf

 !endif

   ArmPkg/Drivers/TimerDxe/TimerDxe.inf

+!ifdef EDK2_ENABLE_PL111

   ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf

+!endif

   ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf

 

   # SMBIOS Support

diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf
index a1ae35a..2bdb635 100644
--- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf
+++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf
@@ -173,7 +173,9 @@
 !else

   INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf

 !endif

+!ifdef EDK2_ENABLE_PL111

   INF ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf

+!endif

   INF ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf

 

   #

diff --git a/Platforms/ARM/VExpress/ArmVExpress.dsc.inc b/Platforms/ARM/VExpress/ArmVExpress.dsc.inc
index d6b02b9..61912ef 100644
--- a/Platforms/ARM/VExpress/ArmVExpress.dsc.inc
+++ b/Platforms/ARM/VExpress/ArmVExpress.dsc.inc
@@ -85,8 +85,10 @@
   ArmPlatformSysConfigLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf

   NorFlashPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/NorFlashArmVExpressLib/NorFlashArmVExpressLib.inf

   EfiResetSystemLib|ArmPlatformPkg/ArmVExpressPkg/Library/ResetSystemLib/ResetSystemLib.inf

+!ifdef EDK2_ENABLE_PL111

   # ARM PL111 Lcd Driver

   LcdPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf

+!endif

   # ARM PL031 RTC Driver

   RealTimeClockLib|ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.inf

   # ARM PL354 SMC Driver