From mboxrd@z Thu Jan 1 00:00:00 1970 From: gregory.clement@free-electrons.com (Gregory CLEMENT) Date: Thu, 20 Feb 2014 16:35:05 +0100 Subject: [PATCH 3/3] ARM: mvebu: use macros for interrupt flags on Armada 375/38x In-Reply-To: <1392894691-26837-4-git-send-email-thomas.petazzoni@free-electrons.com> References: <1392894691-26837-1-git-send-email-thomas.petazzoni@free-electrons.com> <1392894691-26837-4-git-send-email-thomas.petazzoni@free-electrons.com> Message-ID: <530620A9.1090708@free-electrons.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Thomas, On 20/02/2014 12:11, Thomas Petazzoni wrote: > Instead of hardcoding the values of the interrupt flags, use the > macros provided by > and for the > Armada 375 and Armada 38x Device Tree files. > > Signed-off-by: Thomas Petazzoni This patch emphasizes the fact that we set the irq type by default, whereas before using device tree, it was the exception. I know that most of the other dtsi using GIC also set it now. So I am fine with it.But I wonder why it was not better to use IRQ_TYPE_NONE by default (which in the code means don't set the irq type). Of course it is not related with the patch itself which just use the macro and doesn't change any value, so: Acked-by: Gregory CLEMENT Thanks, Gregory > --- > arch/arm/boot/dts/armada-375.dtsi | 57 +++++++++++++++++++++------------------ > arch/arm/boot/dts/armada-380.dtsi | 6 ++--- > arch/arm/boot/dts/armada-385.dtsi | 8 +++--- > arch/arm/boot/dts/armada-38x.dtsi | 45 +++++++++++++++++-------------- > 4 files changed, 63 insertions(+), 53 deletions(-) > > diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi > index 23d497f..3877693 100644 > --- a/arch/arm/boot/dts/armada-375.dtsi > +++ b/arch/arm/boot/dts/armada-375.dtsi > @@ -13,6 +13,7 @@ > > #include "skeleton.dtsi" > #include > +#include > > #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16)) > > @@ -130,7 +131,7 @@ > timer at c600 { > compatible = "arm,cortex-a9-twd-timer"; > reg = <0xc600 0x20>; > - interrupts = ; > + interrupts = ; > clocks = <&coreclk 2>; > }; > > @@ -149,7 +150,7 @@ > #address-cells = <1>; > #size-cells = <0>; > cell-index = <0>; > - interrupts = ; > + interrupts = ; > clocks = <&coreclk 0>; > status = "disabled"; > }; > @@ -160,7 +161,7 @@ > #address-cells = <1>; > #size-cells = <0>; > cell-index = <1>; > - interrupts = ; > + interrupts = ; > clocks = <&coreclk 0>; > status = "disabled"; > }; > @@ -170,7 +171,7 @@ > reg = <0x11000 0x20>; > #address-cells = <1>; > #size-cells = <0>; > - interrupts = ; > + interrupts = ; > timeout-ms = <1000>; > clocks = <&coreclk 0>; > status = "disabled"; > @@ -181,7 +182,7 @@ > reg = <0x11100 0x20>; > #address-cells = <1>; > #size-cells = <0>; > - interrupts = ; > + interrupts = ; > timeout-ms = <1000>; > clocks = <&coreclk 0>; > status = "disabled"; > @@ -191,7 +192,7 @@ > compatible = "snps,dw-apb-uart"; > reg = <0x12000 0x100>; > reg-shift = <2>; > - interrupts = ; > + interrupts = ; > reg-io-width = <1>; > status = "disabled"; > }; > @@ -200,7 +201,7 @@ > compatible = "snps,dw-apb-uart"; > reg = <0x12100 0x100>; > reg-shift = <2>; > - interrupts = ; > + interrupts = ; > reg-io-width = <1>; > status = "disabled"; > }; > @@ -249,8 +250,10 @@ > #gpio-cells = <2>; > interrupt-controller; > #interrupt-cells = <2>; > - interrupts = , , > - , ; > + interrupts = , > + , > + , > + ; > }; > > gpio1: gpio at 18140 { > @@ -261,8 +264,10 @@ > #gpio-cells = <2>; > interrupt-controller; > #interrupt-cells = <2>; > - interrupts = , , > - , ; > + interrupts = , > + , > + , > + ; > }; > > gpio2: gpio at 18180 { > @@ -273,7 +278,7 @@ > #gpio-cells = <2>; > interrupt-controller; > #interrupt-cells = <2>; > - interrupts = ; > + interrupts = ; > }; > > system-controller at 18200 { > @@ -300,16 +305,16 @@ > #size-cells = <1>; > interrupt-controller; > msi-controller; > - interrupts = ; > + interrupts = ; > }; > > timer at 20300 { > compatible = "marvell,armada-375-timer", "marvell,armada-370-timer"; > reg = <0x20300 0x30>, <0x21040 0x30>; > - interrupts-extended = <&gic GIC_SPI 8 4>, > - <&gic GIC_SPI 9 4>, > - <&gic GIC_SPI 10 4>, > - <&gic GIC_SPI 11 4>, > + interrupts-extended = <&gic GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, > + <&gic GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, > + <&gic GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>, > + <&gic GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, > <&mpic 5>, > <&mpic 6>; > clocks = <&coreclk 0>; > @@ -323,12 +328,12 @@ > status = "okay"; > > xor00 { > - interrupts = ; > + interrupts = ; > dmacap,memcpy; > dmacap,xor; > }; > xor01 { > - interrupts = ; > + interrupts = ; > dmacap,memcpy; > dmacap,xor; > dmacap,memset; > @@ -343,12 +348,12 @@ > status = "okay"; > > xor10 { > - interrupts = ; > + interrupts = ; > dmacap,memcpy; > dmacap,xor; > }; > xor11 { > - interrupts = ; > + interrupts = ; > dmacap,memcpy; > dmacap,xor; > dmacap,memset; > @@ -358,7 +363,7 @@ > sata at a0000 { > compatible = "marvell,orion-sata"; > reg = <0xa0000 0x5000>; > - interrupts = ; > + interrupts = ; > clocks = <&gateclk 14>, <&gateclk 20>; > clock-names = "0", "1"; > status = "disabled"; > @@ -369,7 +374,7 @@ > reg = <0xd0000 0x54>; > #address-cells = <1>; > #size-cells = <1>; > - interrupts = ; > + interrupts = ; > clocks = <&gateclk 11>; > status = "disabled"; > }; > @@ -377,7 +382,7 @@ > mvsdio at d4000 { > compatible = "marvell,orion-sdio"; > reg = <0xd4000 0x200>; > - interrupts = ; > + interrupts = ; > clocks = <&gateclk 17>; > bus-width = <4>; > cap-sdio-irq; > @@ -430,7 +435,7 @@ > ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0 > 0x81000000 0 0 0x81000000 0x1 0 1 0>; > interrupt-map-mask = <0 0 0 0>; > - interrupt-map = <0 0 0 0 &gic GIC_SPI 29 0x4>; > + interrupt-map = <0 0 0 0 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; > marvell,pcie-port = <0>; > marvell,pcie-lane = <0>; > clocks = <&gateclk 5>; > @@ -447,7 +452,7 @@ > ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 > 0x81000000 0 0 0x81000000 0x2 0 1 0>; > interrupt-map-mask = <0 0 0 0>; > - interrupt-map = <0 0 0 0 &gic GIC_SPI 33 0x4>; > + interrupt-map = <0 0 0 0 &gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; > marvell,pcie-port = <0>; > marvell,pcie-lane = <1>; > clocks = <&gateclk 6>; > diff --git a/arch/arm/boot/dts/armada-380.dtsi b/arch/arm/boot/dts/armada-380.dtsi > index 678ba3d..068031f 100644 > --- a/arch/arm/boot/dts/armada-380.dtsi > +++ b/arch/arm/boot/dts/armada-380.dtsi > @@ -70,7 +70,7 @@ > ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0 > 0x81000000 0 0 0x81000000 0x1 0 1 0>; > interrupt-map-mask = <0 0 0 0>; > - interrupt-map = <0 0 0 0 &gic GIC_SPI 29 0x4>; > + interrupt-map = <0 0 0 0 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; > marvell,pcie-port = <0>; > marvell,pcie-lane = <0>; > clocks = <&gateclk 8>; > @@ -88,7 +88,7 @@ > ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 > 0x81000000 0 0 0x81000000 0x2 0 1 0>; > interrupt-map-mask = <0 0 0 0>; > - interrupt-map = <0 0 0 0 &gic GIC_SPI 33 0x4>; > + interrupt-map = <0 0 0 0 &gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; > marvell,pcie-port = <1>; > marvell,pcie-lane = <0>; > clocks = <&gateclk 5>; > @@ -106,7 +106,7 @@ > ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0 > 0x81000000 0 0 0x81000000 0x3 0 1 0>; > interrupt-map-mask = <0 0 0 0>; > - interrupt-map = <0 0 0 0 &gic GIC_SPI 70 0x4>; > + interrupt-map = <0 0 0 0 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; > marvell,pcie-port = <2>; > marvell,pcie-lane = <0>; > clocks = <&gateclk 6>; > diff --git a/arch/arm/boot/dts/armada-385.dtsi b/arch/arm/boot/dts/armada-385.dtsi > index 055bc2f..e2919f0 100644 > --- a/arch/arm/boot/dts/armada-385.dtsi > +++ b/arch/arm/boot/dts/armada-385.dtsi > @@ -81,7 +81,7 @@ > ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0 > 0x81000000 0 0 0x81000000 0x1 0 1 0>; > interrupt-map-mask = <0 0 0 0>; > - interrupt-map = <0 0 0 0 &gic GIC_SPI 29 0x4>; > + interrupt-map = <0 0 0 0 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; > marvell,pcie-port = <0>; > marvell,pcie-lane = <0>; > clocks = <&gateclk 8>; > @@ -99,7 +99,7 @@ > ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 > 0x81000000 0 0 0x81000000 0x2 0 1 0>; > interrupt-map-mask = <0 0 0 0>; > - interrupt-map = <0 0 0 0 &gic GIC_SPI 33 0x4>; > + interrupt-map = <0 0 0 0 &gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; > marvell,pcie-port = <1>; > marvell,pcie-lane = <0>; > clocks = <&gateclk 5>; > @@ -117,7 +117,7 @@ > ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0 > 0x81000000 0 0 0x81000000 0x3 0 1 0>; > interrupt-map-mask = <0 0 0 0>; > - interrupt-map = <0 0 0 0 &gic GIC_SPI 70 0x4>; > + interrupt-map = <0 0 0 0 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; > marvell,pcie-port = <2>; > marvell,pcie-lane = <0>; > clocks = <&gateclk 6>; > @@ -138,7 +138,7 @@ > ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0 > 0x81000000 0 0 0x81000000 0x4 0 1 0>; > interrupt-map-mask = <0 0 0 0>; > - interrupt-map = <0 0 0 0 &gic GIC_SPI 71 0x4>; > + interrupt-map = <0 0 0 0 &gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; > marvell,pcie-port = <3>; > marvell,pcie-lane = <0>; > clocks = <&gateclk 7>; > diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi > index 502d21a..812ce28 100644 > --- a/arch/arm/boot/dts/armada-38x.dtsi > +++ b/arch/arm/boot/dts/armada-38x.dtsi > @@ -14,6 +14,7 @@ > > #include "skeleton.dtsi" > #include > +#include > > #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16)) > > @@ -110,7 +111,7 @@ > timer at c600 { > compatible = "arm,cortex-a9-twd-timer"; > reg = <0xc600 0x20>; > - interrupts = ; > + interrupts = ; > clocks = <&coreclk 2>; > }; > > @@ -129,7 +130,7 @@ > #address-cells = <1>; > #size-cells = <0>; > cell-index = <0>; > - interrupts = ; > + interrupts = ; > clocks = <&coreclk 0>; > status = "disabled"; > }; > @@ -140,7 +141,7 @@ > #address-cells = <1>; > #size-cells = <0>; > cell-index = <1>; > - interrupts = ; > + interrupts = ; > clocks = <&coreclk 0>; > status = "disabled"; > }; > @@ -150,7 +151,7 @@ > reg = <0x11000 0x20>; > #address-cells = <1>; > #size-cells = <0>; > - interrupts = ; > + interrupts = ; > timeout-ms = <1000>; > clocks = <&coreclk 0>; > status = "disabled"; > @@ -161,7 +162,7 @@ > reg = <0x11100 0x20>; > #address-cells = <1>; > #size-cells = <0>; > - interrupts = ; > + interrupts = ; > timeout-ms = <1000>; > clocks = <&coreclk 0>; > status = "disabled"; > @@ -171,7 +172,7 @@ > compatible = "snps,dw-apb-uart"; > reg = <0x12000 0x100>; > reg-shift = <2>; > - interrupts = ; > + interrupts = ; > reg-io-width = <1>; > status = "disabled"; > }; > @@ -180,7 +181,7 @@ > compatible = "snps,dw-apb-uart"; > reg = <0x12100 0x100>; > reg-shift = <2>; > - interrupts = ; > + interrupts = ; > reg-io-width = <1>; > status = "disabled"; > }; > @@ -198,8 +199,10 @@ > #gpio-cells = <2>; > interrupt-controller; > #interrupt-cells = <2>; > - interrupts = , , > - , ; > + interrupts = , > + , > + , > + ; > }; > > gpio1: gpio at 18140 { > @@ -210,8 +213,10 @@ > #gpio-cells = <2>; > interrupt-controller; > #interrupt-cells = <2>; > - interrupts = , , > - , ; > + interrupts = , > + , > + , > + ; > }; > > system-controller at 18200 { > @@ -245,17 +250,17 @@ > #size-cells = <1>; > interrupt-controller; > msi-controller; > - interrupts = ; > + interrupts = ; > }; > > timer at 20300 { > compatible = "marvell,armada-380-timer", > "marvell,armada-xp-timer"; > reg = <0x20300 0x30>, <0x21040 0x30>; > - interrupts-extended = <&gic GIC_SPI 8 4>, > - <&gic GIC_SPI 9 4>, > - <&gic GIC_SPI 10 4>, > - <&gic GIC_SPI 11 4>, > + interrupts-extended = <&gic GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, > + <&gic GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, > + <&gic GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>, > + <&gic GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, > <&mpic 5>, > <&mpic 6>; > clocks = <&coreclk 2>, <&refclk>; > @@ -286,12 +291,12 @@ > status = "okay"; > > xor00 { > - interrupts = ; > + interrupts = ; > dmacap,memcpy; > dmacap,xor; > }; > xor01 { > - interrupts = ; > + interrupts = ; > dmacap,memcpy; > dmacap,xor; > dmacap,memset; > @@ -306,12 +311,12 @@ > status = "okay"; > > xor10 { > - interrupts = ; > + interrupts = ; > dmacap,memcpy; > dmacap,xor; > }; > xor11 { > - interrupts = ; > + interrupts = ; > dmacap,memcpy; > dmacap,xor; > dmacap,memset; > -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com