1 The Armada XP GPIO controller has two ways of notifying interrupts:
2 using global interrupts or using per-CPU interrupts. In an attempt to
3 use the best available features, the 'marvell,armadaxp-gpio'
4 compatible string selects a variant of the gpio-mvebu driver that
5 makes use of the per-CPU interrupts.
7 Unfortunately, this doesn't work properly in a SMP context, because we
8 fall into cases where the GPIO interrupt is enabled on CPU X at the
9 GPIO controller level, but on CPU Y at the interrupt controller
10 level. It is not yet clear how to fix that easily.
12 So for 3.8, our approach is to switch to global interrupts for GPIOs,
13 so that we do not fall into this per-CPU interrupts problem.
15 This patch therefore fixes GPIO interrupts on Armada XP
16 platforms. Without this patch, GPIO interrupts simply do not work
17 reliably, because their proper operation depends on which CPU the code
18 requesting the interrupt is running.
20 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
22 This is 3.8-rc material.
24 arch/arm/boot/dts/armada-xp-mv78230.dtsi | 14 ++++++--------
25 arch/arm/boot/dts/armada-xp-mv78260.dtsi | 21 +++++++++------------
26 arch/arm/boot/dts/armada-xp-mv78460.dtsi | 21 +++++++++------------
27 3 files changed, 24 insertions(+), 32 deletions(-)
29 diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
30 index 271855a..e041f42 100644
31 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi
32 +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
36 gpio0: gpio@d0018100 {
37 - compatible = "marvell,armadaxp-gpio";
38 - reg = <0xd0018100 0x40>,
40 + compatible = "marvell,orion-gpio";
41 + reg = <0xd0018100 0x40>;
46 #interrupts-cells = <2>;
47 - interrupts = <16>, <17>, <18>, <19>;
48 + interrupts = <82>, <83>, <84>, <85>;
51 gpio1: gpio@d0018140 {
52 - compatible = "marvell,armadaxp-gpio";
53 - reg = <0xd0018140 0x40>,
55 + compatible = "marvell,orion-gpio";
56 + reg = <0xd0018140 0x40>;
61 #interrupts-cells = <2>;
62 - interrupts = <20>, <21>, <22>;
63 + interrupts = <87>, <88>, <89>;
67 diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
68 index 1c1937d..9e23bd8 100644
69 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
70 +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
74 gpio0: gpio@d0018100 {
75 - compatible = "marvell,armadaxp-gpio";
76 - reg = <0xd0018100 0x40>,
78 + compatible = "marvell,orion-gpio";
79 + reg = <0xd0018100 0x40>;
84 #interrupts-cells = <2>;
85 - interrupts = <16>, <17>, <18>, <19>;
86 + interrupts = <82>, <83>, <84>, <85>;
89 gpio1: gpio@d0018140 {
90 - compatible = "marvell,armadaxp-gpio";
91 - reg = <0xd0018140 0x40>,
93 + compatible = "marvell,orion-gpio";
94 + reg = <0xd0018140 0x40>;
99 #interrupts-cells = <2>;
100 - interrupts = <20>, <21>, <22>, <23>;
101 + interrupts = <87>, <88>, <89>, <90>;
104 gpio2: gpio@d0018180 {
105 - compatible = "marvell,armadaxp-gpio";
106 - reg = <0xd0018180 0x40>,
108 + compatible = "marvell,orion-gpio";
109 + reg = <0xd0018180 0x40>;
113 interrupt-controller;
114 #interrupts-cells = <2>;
120 diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
121 index 4905cf3..9659661 100644
122 --- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi
123 +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
127 gpio0: gpio@d0018100 {
128 - compatible = "marvell,armadaxp-gpio";
129 - reg = <0xd0018100 0x40>,
131 + compatible = "marvell,orion-gpio";
132 + reg = <0xd0018100 0x40>;
136 interrupt-controller;
137 #interrupts-cells = <2>;
138 - interrupts = <16>, <17>, <18>, <19>;
139 + interrupts = <82>, <83>, <84>, <85>;
142 gpio1: gpio@d0018140 {
143 - compatible = "marvell,armadaxp-gpio";
144 - reg = <0xd0018140 0x40>,
146 + compatible = "marvell,orion-gpio";
147 + reg = <0xd0018140 0x40>;
151 interrupt-controller;
152 #interrupts-cells = <2>;
153 - interrupts = <20>, <21>, <22>, <23>;
154 + interrupts = <87>, <88>, <89>, <90>;
157 gpio2: gpio@d0018180 {
158 - compatible = "marvell,armadaxp-gpio";
159 - reg = <0xd0018180 0x40>,
161 + compatible = "marvell,orion-gpio";
162 + reg = <0xd0018180 0x40>;
166 interrupt-controller;
167 #interrupts-cells = <2>;