diff options
author | Grant Likely <grant.likely@linaro.org> | 2013-10-11 23:04:23 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2013-10-24 12:43:21 +0200 |
commit | a9f10ca76d784023fc45f01f025b54e9960f4ec1 (patch) | |
tree | e109b0adf32531c8c45c1426a3da25154b1dc165 /arch | |
parent | of: Add helper for printing an of_phandle_args structure (diff) | |
download | linux-a9f10ca76d784023fc45f01f025b54e9960f4ec1.tar.xz linux-a9f10ca76d784023fc45f01f025b54e9960f4ec1.zip |
of: Add testcases for interrupt parsing
This patch extends the DT selftest code with some test cases for the
interrupt parsing functions.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/dts/testcases/tests-interrupts.dtsi | 41 | ||||
-rw-r--r-- | arch/arm/boot/dts/testcases/tests.dtsi | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/testcases/tests-interrupts.dtsi b/arch/arm/boot/dts/testcases/tests-interrupts.dtsi new file mode 100644 index 000000000000..6ecda716e9d4 --- /dev/null +++ b/arch/arm/boot/dts/testcases/tests-interrupts.dtsi @@ -0,0 +1,41 @@ + +/ { + testcase-data { + interrupts { + #address-cells = <0>; + test_intc0: intc0 { + interrupt-controller; + #interrupt-cells = <1>; + }; + + test_intc1: intc1 { + interrupt-controller; + #interrupt-cells = <3>; + }; + + test_intc2: intc2 { + interrupt-controller; + #interrupt-cells = <2>; + }; + + test_intmap0: intmap0 { + #interrupt-cells = <1>; + #address-cells = <0>; + interrupt-map = <1 &test_intc0 9>, + <2 &test_intc1 10 11 12>, + <3 &test_intc2 13 14>, + <4 &test_intc2 15 16>; + }; + + interrupts0 { + interrupt-parent = <&test_intc0>; + interrupts = <1>, <2>, <3>, <4>; + }; + + interrupts1 { + interrupt-parent = <&test_intmap0>; + interrupts = <1>, <2>, <3>, <4>; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/testcases/tests.dtsi b/arch/arm/boot/dts/testcases/tests.dtsi index a7c5067622e8..3f123ecc9dd7 100644 --- a/arch/arm/boot/dts/testcases/tests.dtsi +++ b/arch/arm/boot/dts/testcases/tests.dtsi @@ -1 +1,2 @@ /include/ "tests-phandle.dtsi" +/include/ "tests-interrupts.dtsi" |