diff options
author | Bunnaroath Sou <bsou@sifive.com> | 2019-03-31 21:27:03 -0700 |
---|---|---|
committer | Bunnaroath Sou <bsou@sifive.com> | 2019-03-31 21:27:03 -0700 |
commit | 6f1f98b4ceeae8cdc3a85dd4e418d04473cb74cb (patch) | |
tree | 1105906530853804552e204c6b732b63061b054a /scripts | |
parent | 77114277bb35ebf1d0eae42dc2159cb6059261a9 (diff) |
Add missing numintbits for clic
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/fixup-dts | 12 |
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 |