@@ -54,6 +54,7 @@
gArmPlatformTokenSpaceGuid.PcdCoreCount
gArmTokenSpaceGuid.PcdArmLinuxFdtMaxOffset
gArmTokenSpaceGuid.PcdArmLinuxFdtAlignment
+ gAmdStyxTokenSpaceGuid.PcdEnableKcs
gAmdStyxTokenSpaceGuid.PcdSata1PortCount
[Guids]
@@ -247,11 +247,12 @@ SetSocIdStatus (
SetDeviceStatus (Fdt, "gpio@e0020000", IsRevB1);
SetDeviceStatus (Fdt, "gpio@e0030000", IsRevB1);
SetDeviceStatus (Fdt, "gwdt@e0bb0000", IsRevB1);
-#if DO_KCS
- SetDeviceStatus (Fdt, "kcs@e0010000", IsRevB1);
-#else
- SetDeviceStatus (Fdt, "kcs@e0010000", FALSE);
-#endif
+
+ if (FixedPcdGetBool (PcdEnableKcs)) {
+ SetDeviceStatus (Fdt, "kcs@e0010000", IsRevB1);
+ } else {
+ SetDeviceStatus (Fdt, "kcs@e0010000", FALSE);
+ }
if (!PcdGetBool (PcdEnableSmmus)) {
DisableSmmu (Fdt, "iommu-map", "/smb/smmu@e0a00000", "/smb/pcie@f0000000");
Get rid of the CPP conditionals, and use the new boolean PCD for KCS support instead. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf | 1 + Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) -- 2.19.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel