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 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi
30 +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
34 gpio0: gpio@d0018100 {
35 - compatible = "marvell,armadaxp-gpio";
36 - reg = <0xd0018100 0x40>,
38 + compatible = "marvell,orion-gpio";
39 + reg = <0xd0018100 0x40>;
44 #interrupts-cells = <2>;
45 - interrupts = <16>, <17>, <18>, <19>;
46 + interrupts = <82>, <83>, <84>, <85>;
49 gpio1: gpio@d0018140 {
50 - compatible = "marvell,armadaxp-gpio";
51 - reg = <0xd0018140 0x40>,
53 + compatible = "marvell,orion-gpio";
54 + reg = <0xd0018140 0x40>;
59 #interrupts-cells = <2>;
60 - interrupts = <20>, <21>, <22>;
61 + interrupts = <87>, <88>, <89>;
65 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
66 +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
70 gpio0: gpio@d0018100 {
71 - compatible = "marvell,armadaxp-gpio";
72 - reg = <0xd0018100 0x40>,
74 + compatible = "marvell,orion-gpio";
75 + reg = <0xd0018100 0x40>;
80 #interrupts-cells = <2>;
81 - interrupts = <16>, <17>, <18>, <19>;
82 + interrupts = <82>, <83>, <84>, <85>;
85 gpio1: gpio@d0018140 {
86 - compatible = "marvell,armadaxp-gpio";
87 - reg = <0xd0018140 0x40>,
89 + compatible = "marvell,orion-gpio";
90 + reg = <0xd0018140 0x40>;
95 #interrupts-cells = <2>;
96 - interrupts = <20>, <21>, <22>, <23>;
97 + interrupts = <87>, <88>, <89>, <90>;
100 gpio2: gpio@d0018180 {
101 - compatible = "marvell,armadaxp-gpio";
102 - reg = <0xd0018180 0x40>,
104 + compatible = "marvell,orion-gpio";
105 + reg = <0xd0018180 0x40>;
109 interrupt-controller;
110 #interrupts-cells = <2>;
116 --- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi
117 +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
121 gpio0: gpio@d0018100 {
122 - compatible = "marvell,armadaxp-gpio";
123 - reg = <0xd0018100 0x40>,
125 + compatible = "marvell,orion-gpio";
126 + reg = <0xd0018100 0x40>;
130 interrupt-controller;
131 #interrupts-cells = <2>;
132 - interrupts = <16>, <17>, <18>, <19>;
133 + interrupts = <82>, <83>, <84>, <85>;
136 gpio1: gpio@d0018140 {
137 - compatible = "marvell,armadaxp-gpio";
138 - reg = <0xd0018140 0x40>,
140 + compatible = "marvell,orion-gpio";
141 + reg = <0xd0018140 0x40>;
145 interrupt-controller;
146 #interrupts-cells = <2>;
147 - interrupts = <20>, <21>, <22>, <23>;
148 + interrupts = <87>, <88>, <89>, <90>;
151 gpio2: gpio@d0018180 {
152 - compatible = "marvell,armadaxp-gpio";
153 - reg = <0xd0018180 0x40>,
155 + compatible = "marvell,orion-gpio";
156 + reg = <0xd0018180 0x40>;
160 interrupt-controller;
161 #interrupts-cells = <2>;