summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
m---------scripts/elf2hex0
-rwxr-xr-xscripts/fixup-dts12
2 files changed, 12 insertions, 0 deletions
diff --git a/scripts/elf2hex b/scripts/elf2hex
-Subproject 082bb6ef004f4576ef4b164b3d5821259cf1114
+Subproject e4efb417de97f17ad87491c56330ac1267e192d
diff --git a/scripts/fixup-dts b/scripts/fixup-dts
index 31ce04f..adea17d 100755
--- a/scripts/fixup-dts
+++ b/scripts/fixup-dts
@@ -31,6 +31,18 @@ then
echo -e "$0: \tAdded pmp@0"
fi
+# Add numintbits for the clic node if it doesn't exist
+
+if [ `grep -c 'sifive,clic0' ${dts}` -ne 0 ]; then
+ if [ `grep -c 'sifive,numintbits' ${dts}` -eq 0 ]; then
+ echo "$0: Clic missing numintbits in ${dts}."
+
+ sed -i 's/interrupt-controller@2000000 {/interrupt-controller@2000000 {\n\t\t\tsifive,numintbits = <2>;/g' ${dts}
+
+ echo -e "$0: \tAdded numintbits to clic."
+ fi
+fi
+
# Add compat string for the global-interrupt node if it doesn't exist
if [ `grep -c 'global-external-interrupts {' ${dts}` -ne 0 ]; then