From 6f1f98b4ceeae8cdc3a85dd4e418d04473cb74cb Mon Sep 17 00:00:00 2001 From: Bunnaroath Sou Date: Sun, 31 Mar 2019 21:27:03 -0700 Subject: Add missing numintbits for clic --- scripts/fixup-dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scripts') 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 -- cgit v1.2.1-18-gbd029