summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2020-05-15 15:18:25 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2020-05-18 14:26:12 +1000
commit81e0919a3e211844245a3c19be28610f930c13c0 (patch)
tree20847aef4fa36922237ba8b274a3d918b0f9b384 /tests
parent85e5d839847af54efab170f2b1331b2a6421e647 (diff)
downloaddevice-tree-compiler-81e0919a3e211844245a3c19be28610f930c13c0.tar.gz
checks: Add interrupt provider test
An interrupt provider (an actual interrupt-controller node or an interrupt nexus) should have both #address-cells and #interrupt-cells properties explicitly defined. Add an extra test for this. We check for the #interrupt-cells property already, but this does not cover every controller so far, only those that get referenced by an interrupts property in some node. Also we miss interrupt nexus nodes. A missing #address-cells property is less critical, but creates ambiguities when used in interrupt-map properties, so warn about this as well now. This removes the now redundant warning in the existing interrupts test. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Message-Id: <20200515141827.27957-2-andre.przywara@arm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/bad-interrupt-controller.dts7
-rwxr-xr-xtests/run_tests.sh1
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/bad-interrupt-controller.dts b/tests/bad-interrupt-controller.dts
new file mode 100644
index 0000000..62fa118
--- /dev/null
+++ b/tests/bad-interrupt-controller.dts
@@ -0,0 +1,7 @@
+/dts-v1/;
+
+/ {
+ intc: interrupt-controller {
+ interrupt-controller;
+ };
+};
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index eccb85d..294585b 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -714,6 +714,7 @@ dtc_tests () {
check_tests "$SRCDIR/bad-graph.dts" graph_endpoint
run_sh_test "$SRCDIR/dtc-checkfails.sh" deprecated_gpio_property -- -Wdeprecated_gpio_property -I dts -O dtb "$SRCDIR/bad-gpio.dts"
check_tests "$SRCDIR/bad-interrupt-cells.dts" interrupts_property
+ check_tests "$SRCDIR/bad-interrupt-controller.dts" interrupt_provider
run_sh_test "$SRCDIR/dtc-checkfails.sh" node_name_chars -- -I dtb -O dtb bad_node_char.dtb
run_sh_test "$SRCDIR/dtc-checkfails.sh" node_name_format -- -I dtb -O dtb bad_node_format.dtb
run_sh_test "$SRCDIR/dtc-checkfails.sh" property_name_chars -- -I dtb -O dtb bad_prop_char.dtb