summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@arm.com>2020-04-08 18:58:03 +0200
committerArd Biesheuvel <ard.biesheuvel@arm.com>2020-04-09 07:46:34 +0200
commit9c4e5fe36d24ecd10c6e8b9e158354941bcb8fb8 (patch)
tree1cff243ef5d19c31d2e2af7176bbee7fe75bb627
parent4a73a96931a57143e887d50b75f13f8ba6ccb9a1 (diff)
Platform/DeveloperBox: omit TPM from DT when building without TPM support
The recently added support for TPM2 measured boot added a description of the TPM to the device tree, but failed to take the build configuration into account, and so it adds it unconditionally. Fix this, by #define'ing a TPM2_ENABLE CPP macro that can be referenced in the device tree source file. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
-rw-r--r--Platform/Socionext/DeveloperBox/DeveloperBox.dsc7
-rw-r--r--Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts2
2 files changed, 8 insertions, 1 deletions
diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
index cddd34e6..9307edef 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
@@ -511,7 +511,12 @@
#
# DT support
#
- Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.inf
+ Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.inf {
+ <BuildOptions>
+!if $(TPM2_ENABLE) == TRUE
+ *_*_*_DTCPP_FLAGS = -D TPM2_ENABLE
+!endif
+ }
#
# Firmware update
diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts b/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts
index e77a3723..47ac2710 100644
--- a/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts
+++ b/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts
@@ -27,9 +27,11 @@
};
};
+#ifdef TPM2_ENABLE
&tpm {
status = "okay";
};
+#endif
&gpio {
gpio-line-names = "DSW3-PIN1", "DSW3-PIN2", "DSW3-PIN3", "DSW3-PIN4",