]> xenbits.xensource.com Git - people/julieng/boot-wrapper-aarch64.git/commitdiff
Add 32-bit compatibility to device-tree CPU nodes
authorJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Wed, 23 Sep 2015 14:21:09 +0000 (15:21 +0100)
committerMark Rutland <mark.rutland@arm.com>
Wed, 15 Jun 2016 09:27:35 +0000 (10:27 +0100)
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>
gen-cpu-nodes.sh

index 4abc03cddf028e5a92e6e5b2b68e567a911acf9b..eaa2e7c0d05e348f267c7fdfb8eff2cd8302619a 100755 (executable)
 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