diff options
author | Bunnaroath Sou <35707615+bsousi5@users.noreply.github.com> | 2019-04-02 10:35:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-02 10:35:35 -0700 |
commit | a4b55a67c32b6ab7caefba27e53d9e109ef192b3 (patch) | |
tree | 1105906530853804552e204c6b732b63061b054a /scripts/fixup-dts | |
parent | cebbb7cb6c7b16767b4ba04e7f231a784be9697a (diff) | |
parent | 6f1f98b4ceeae8cdc3a85dd4e418d04473cb74cb (diff) |
Merge pull request #229 from sifive/mk-settings
Add generating settings.mk
Diffstat (limited to 'scripts/fixup-dts')
-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 |