summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBunnaroath Sou <bsou@sifive.com>2019-03-31 21:27:03 -0700
committerBunnaroath Sou <bsou@sifive.com>2019-03-31 21:27:03 -0700
commit6f1f98b4ceeae8cdc3a85dd4e418d04473cb74cb (patch)
tree1105906530853804552e204c6b732b63061b054a
parent77114277bb35ebf1d0eae42dc2159cb6059261a9 (diff)
Add missing numintbits for clic
-rwxr-xr-xscripts/fixup-dts12
1 files changed, 12 insertions, 0 deletions
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