Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: timer: Use defines instead of numbers in Exynos MCT examples

Make the examples in Exynos Multi Core Timer bindings more readable and
bring them closer to real DTS by using defines for interrupt flags.
Fix also GIC interrupt type in example for Exynos4412 (from SPI to PPI).

Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Rob Herring
4b73b6f7 65eba0db

+27 -10
+27 -10
Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml
··· 57 57 // In this example, the IP contains two local timers, using separate 58 58 // interrupts, so two local timer interrupts have been specified, 59 59 // in addition to four global timer interrupts. 60 + #include <dt-bindings/interrupt-controller/arm-gic.h> 60 61 61 62 timer@10050000 { 62 63 compatible = "samsung,exynos4210-mct"; 63 64 reg = <0x10050000 0x800>; 64 - interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, 65 - <0 42 0>, <0 48 0>; 65 + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, 66 + <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, 67 + <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, 68 + <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, 69 + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, 70 + <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; 66 71 }; 67 72 68 73 - | 69 74 // In this example, the timer interrupts are connected to two separate 70 75 // interrupt controllers. Hence, an interrupts-extended is needed. 76 + #include <dt-bindings/interrupt-controller/arm-gic.h> 71 77 72 78 timer@101c0000 { 73 79 compatible = "samsung,exynos4210-mct"; 74 80 reg = <0x101C0000 0x800>; 75 - interrupts-extended = <&gic 0 57 0>, 76 - <&gic 0 69 0>, 81 + interrupts-extended = <&gic GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, 82 + <&gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, 77 83 <&combiner 12 6>, 78 84 <&combiner 12 7>, 79 - <&gic 0 42 0>, 80 - <&gic 0 48 0>; 85 + <&gic GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, 86 + <&gic GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; 81 87 }; 82 88 83 89 - | 84 90 // In this example, the IP contains four local timers, but using 85 91 // a per-processor interrupt to handle them. Only one first local 86 92 // interrupt is specified. 93 + #include <dt-bindings/interrupt-controller/arm-gic.h> 87 94 88 95 timer@10050000 { 89 96 compatible = "samsung,exynos4412-mct"; 90 97 reg = <0x10050000 0x800>; 91 98 92 - interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, 93 - <0 42 0>; 99 + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, 100 + <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, 101 + <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, 102 + <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, 103 + <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>; 94 104 }; 95 105 96 106 - | 97 107 // In this example, the IP contains four local timers, but using 98 108 // a per-processor interrupt to handle them. All the local timer 99 109 // interrupts are specified. 110 + #include <dt-bindings/interrupt-controller/arm-gic.h> 100 111 101 112 timer@10050000 { 102 113 compatible = "samsung,exynos4412-mct"; 103 114 reg = <0x10050000 0x800>; 104 115 105 - interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, 106 - <0 42 0>, <0 42 0>, <0 42 0>, <0 42 0>; 116 + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, 117 + <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, 118 + <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, 119 + <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, 120 + <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>, 121 + <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>, 122 + <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>, 123 + <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>; 107 124 };