summaryrefslogtreecommitdiff
path: root/scripts/fixup-dts
diff options
context:
space:
mode:
authorNathaniel Graff <nathaniel.graff@sifive.com>2019-05-06 15:05:05 -0700
committerNathaniel Graff <nathaniel.graff@sifive.com>2019-05-06 15:05:16 -0700
commitab15b5e5f7f26261adee86303ecc086ad1026a29 (patch)
treefba98e6728f948f2939becb8ec277eb1ba225d7a /scripts/fixup-dts
parent9746bfc2c79bd4e9b4a72652168efb60dac44758 (diff)
Check for targets which don't support PMP
Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
Diffstat (limited to 'scripts/fixup-dts')
-rwxr-xr-xscripts/fixup-dts17
1 files changed, 13 insertions, 4 deletions
diff --git a/scripts/fixup-dts b/scripts/fixup-dts
index 5871d9b..503653c 100755
--- a/scripts/fixup-dts
+++ b/scripts/fixup-dts
@@ -31,13 +31,22 @@ fi
# Add a PMP node if it doesn't exist
-if [ `grep -c 'riscv,pmp' ${dts}` -eq 0 ]
-then
+if [ `grep -c 'riscv,pmp' ${dts}` -eq 0 ]; then
+
echo "$0: PMP node not found in ${dts}."
- ${SED} -i 's/ranges;/ranges;\n\t\tpmp: pmp@0 {\n\t\t\tcompatible = "riscv,pmp";\n\t\t\tregions = <1>;\n\t\t};/' ${dts}
+ # Check for targets without PMP support
+
+ TARGET=`echo ${dts} | cut -d '/' -f 1`
+ if [ $TARGET != "freedom-e310-arty" -a \
+ $TARGET != "sifive-hifive1" -a \
+ $TARGET != "coreip-e20-rtl" -a \
+ $TARGET != "coreip-e20-arty" ]; then
- echo -e "$0: \tAdded pmp@0"
+ ${SED} -i 's/ranges;/ranges;\n\t\tpmp: pmp@0 {\n\t\t\tcompatible = "riscv,pmp";\n\t\t\tregions = <1>;\n\t\t};/' ${dts}
+
+ echo -e "$0: \tAdded pmp@0"
+ fi
fi
# Add numintbits for the clic node if it doesn't exist