* [PATCH] dt-bindings: timer: Use defines instead of numbers in Exynos MCT examples @ 2019-09-26 18:36 ` Krzysztof Kozlowski 2019-09-27 6:36 ` Marek Szyprowski 0 siblings, 1 reply; 3+ messages in thread From: Krzysztof Kozlowski @ 2019-09-26 18:36 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Mark Rutland, Kukjin Kim, Krzysztof Kozlowski, linux-kernel, devicetree, linux-arm-kernel, linux-samsung-soc Cc: Marek Szyprowski Make the examples in Exynos Multi Core Timer bindings more readable and bring them closer to real DTS by using defines for interrupt flags. Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> --- Rebased on top of: https://patchwork.kernel.org/project/linux-samsung-soc/list/?series=177667&state=* --- .../timer/samsung,exynos4210-mct.yaml | 37 ++++++++++++++----- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml index bff3f54a398f..c4d152009f76 100644 --- a/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml +++ b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml @@ -75,51 +75,68 @@ examples: // In this example, the IP contains two local timers, using separate // interrupts, so two local timer interrupts have been specified, // in addition to four global timer interrupts. + #include <dt-bindings/interrupt-controller/arm-gic.h> timer@10050000 { compatible = "samsung,exynos4210-mct"; reg = <0x10050000 0x800>; - interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, - <0 42 0>, <0 48 0>; + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; }; - | // In this example, the timer interrupts are connected to two separate // interrupt controllers. Hence, an interrupts-extended is needed. + #include <dt-bindings/interrupt-controller/arm-gic.h> timer@101c0000 { compatible = "samsung,exynos4210-mct"; reg = <0x101C0000 0x800>; - interrupts-extended = <&gic 0 57 0>, - <&gic 0 69 0>, + interrupts-extended = <&gic GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, + <&gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, <&combiner 12 6>, <&combiner 12 7>, - <&gic 0 42 0>, - <&gic 0 48 0>; + <&gic GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, + <&gic GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; }; - | // In this example, the IP contains four local timers, but using // a per-processor interrupt to handle them. Only one first local // interrupt is specified. + #include <dt-bindings/interrupt-controller/arm-gic.h> timer@10050000 { compatible = "samsung,exynos4412-mct"; reg = <0x10050000 0x800>; - interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, - <0 42 0>; + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; }; - | // In this example, the IP contains four local timers, but using // a per-processor interrupt to handle them. All the local timer // interrupts are specified. + #include <dt-bindings/interrupt-controller/arm-gic.h> timer@10050000 { compatible = "samsung,exynos4412-mct"; reg = <0x10050000 0x800>; - interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, - <0 42 0>, <0 42 0>, <0 42 0>, <0 42 0>; + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; }; -- 2.17.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: timer: Use defines instead of numbers in Exynos MCT examples 2019-09-26 18:36 ` [PATCH] dt-bindings: timer: Use defines instead of numbers in Exynos MCT examples Krzysztof Kozlowski @ 2019-09-27 6:36 ` Marek Szyprowski 2019-09-27 6:52 ` Krzysztof Kozlowski 0 siblings, 1 reply; 3+ messages in thread From: Marek Szyprowski @ 2019-09-27 6:36 UTC (permalink / raw) To: Krzysztof Kozlowski, Daniel Lezcano, Thomas Gleixner, Rob Herring, Mark Rutland, Kukjin Kim, linux-kernel, devicetree, linux-arm-kernel, linux-samsung-soc Hi Krzysztof, On 26.09.2019 20:36, Krzysztof Kozlowski wrote: > Make the examples in Exynos Multi Core Timer bindings more readable and > bring them closer to real DTS by using defines for interrupt flags. > > Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> > > --- > > Rebased on top of: > https://patchwork.kernel.org/project/linux-samsung-soc/list/?series=177667&state=* > --- > .../timer/samsung,exynos4210-mct.yaml | 37 ++++++++++++++----- > 1 file changed, 27 insertions(+), 10 deletions(-) > > diff --git a/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml > index bff3f54a398f..c4d152009f76 100644 > --- a/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml > +++ b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml > @@ -75,51 +75,68 @@ examples: > // In this example, the IP contains two local timers, using separate > // interrupts, so two local timer interrupts have been specified, > // in addition to four global timer interrupts. > + #include <dt-bindings/interrupt-controller/arm-gic.h> > > timer@10050000 { > compatible = "samsung,exynos4210-mct"; > reg = <0x10050000 0x800>; > - interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, > - <0 42 0>, <0 48 0>; > + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; > }; > > - | > // In this example, the timer interrupts are connected to two separate > // interrupt controllers. Hence, an interrupts-extended is needed. > + #include <dt-bindings/interrupt-controller/arm-gic.h> > > timer@101c0000 { > compatible = "samsung,exynos4210-mct"; > reg = <0x101C0000 0x800>; > - interrupts-extended = <&gic 0 57 0>, > - <&gic 0 69 0>, > + interrupts-extended = <&gic GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, > + <&gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, > <&combiner 12 6>, > <&combiner 12 7>, > - <&gic 0 42 0>, > - <&gic 0 48 0>; > + <&gic GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, > + <&gic GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; > }; > > - | > // In this example, the IP contains four local timers, but using > // a per-processor interrupt to handle them. Only one first local > // interrupt is specified. > + #include <dt-bindings/interrupt-controller/arm-gic.h> > > timer@10050000 { > compatible = "samsung,exynos4412-mct"; > reg = <0x10050000 0x800>; > > - interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, > - <0 42 0>; > + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; the last one should be GIC_PPI > }; > > - | > // In this example, the IP contains four local timers, but using > // a per-processor interrupt to handle them. All the local timer > // interrupts are specified. > + #include <dt-bindings/interrupt-controller/arm-gic.h> > > timer@10050000 { > compatible = "samsung,exynos4412-mct"; > reg = <0x10050000 0x800>; > > - interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, > - <0 42 0>, <0 42 0>, <0 42 0>, <0 42 0>; > + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; again, last 4 entries should use GIC_PPI Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: timer: Use defines instead of numbers in Exynos MCT examples 2019-09-27 6:36 ` Marek Szyprowski @ 2019-09-27 6:52 ` Krzysztof Kozlowski 0 siblings, 0 replies; 3+ messages in thread From: Krzysztof Kozlowski @ 2019-09-27 6:52 UTC (permalink / raw) To: Marek Szyprowski Cc: Daniel Lezcano, Thomas Gleixner, Rob Herring, Mark Rutland, Kukjin Kim, linux-kernel, devicetree, linux-arm-kernel, linux-samsung-soc On Fri, Sep 27, 2019 at 08:36:47AM +0200, Marek Szyprowski wrote: > Hi Krzysztof, > > > timer@10050000 { > > compatible = "samsung,exynos4412-mct"; > > reg = <0x10050000 0x800>; > > > > - interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, > > - <0 42 0>; > > + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; > > the last one should be GIC_PPI > > > }; > > > > - | > > // In this example, the IP contains four local timers, but using > > // a per-processor interrupt to handle them. All the local timer > > // interrupts are specified. > > + #include <dt-bindings/interrupt-controller/arm-gic.h> > > > > timer@10050000 { > > compatible = "samsung,exynos4412-mct"; > > reg = <0x10050000 0x800>; > > > > - interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, > > - <0 42 0>, <0 42 0>, <0 42 0>, <0 42 0>; > > + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; > > again, last 4 entries should use GIC_PPI Indeed, thanks for noticing it. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-27 6:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20190926183707epcas3p350fe17bc738540b37f1130d967c31a62@epcas3p3.samsung.com>
2019-09-26 18:36 ` [PATCH] dt-bindings: timer: Use defines instead of numbers in Exynos MCT examples Krzysztof Kozlowski
2019-09-27 6:36 ` Marek Szyprowski
2019-09-27 6:52 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).