aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Brucker <jean-philippe.brucker@arm.com>2015-09-23 15:21:09 +0100
committerMark Rutland <mark.rutland@arm.com>2016-06-15 10:27:35 +0100
commitc311db0c5821f72604bfdaf40c6cbb0b672017c1 (patch)
tree23aa61afc9d7fe809df0b8621a7f61292b8ed84e
parentf01ed6c65ce267c37efc3d48fc68e36af2d00e62 (diff)
downloadboot-wrapper-aarch64-c311db0c5821f72604bfdaf40c6cbb0b672017c1.tar.gz
Add 32-bit compatibility to device-tree CPU nodes
The 32-bit DT parser in Linux doesn't understand 'reg' properties with two cells, in a CPU node. Since the boot-wrapper always sets the upper bits to 0, we can restrict that size to one cell. The parser also requires the device_type property to be present. This is the case for arm64 as well, but it only fails when the patched device-tree doesn't have any CPU node to begin with. Add device_type unconditionally. Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
-rwxr-xr-xgen-cpu-nodes.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/gen-cpu-nodes.sh b/gen-cpu-nodes.sh
index 4abc03c..eaa2e7c 100755
--- a/gen-cpu-nodes.sh
+++ b/gen-cpu-nodes.sh
@@ -10,10 +10,15 @@
CPU_IDS=$1;
CPU_IDS_NO_HEX=$(echo $CPU_IDS | sed s/0x//g);
CPU_IDS_NO_HEX=$(echo $CPU_IDS_NO_HEX | sed s/\,/\ /g);
+
+echo '#address-cells = <0x1>;'
+echo '#size-cells = <0>;'
+
for id in $CPU_IDS_NO_HEX;
do
- echo "cpu@$id {";
- echo ' enable-method = \"psci\";';
- echo " reg = <0 0x$id>;";
- echo "};";
+ echo "cpu@$id {"
+ echo ' device_type = \"cpu\";'
+ echo ' enable-method = \"psci\";'
+ echo " reg = <0x$id>;"
+ echo "};"
done