Skip to content

Commit 20f1275

Browse files
Linus Walleijolofj
authored andcommitted
ARM: versatile: fix MMC/SD interrupt assignment
Commit 0976c94 "arm/versatile: Fix versatile irq specifications" has an off-by-one error on the Versatile AB that has been regressing the Versatile AB hardware for some time. However it seems like the interrupt assignments have never been correct and I have now adjusted them according to the specification. The masks for the valid interrupts made it impossible to assign the right SIC interrupt for the MMCI, so I went in and fixed these to correspond to the specifications, and added references if anyone wants to double-check. Due to the Versatile PB including the Versatile AB as a base DTS file, we need to override and correct some values to correspond to the actual changes in the hardware. For the Versatile PB I don't think the IRQ line assignment for MMCI has ever been correct for either of the two MMCI blocks. It would be nice if someone with the physical PB board could test this. Patch tested on the Versatile AB, QEMU for Versatile AB and QEMU for Versatile PB. Cc: Rob Herring <robh@kernel.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: stable@vger.kernel.org Fixes: 0976c94 ("arm/versatile: Fix versatile irq specifications") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Olof Johansson <olof@lixom.net>
1 parent a461a3e commit 20f1275

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

arch/arm/boot/dts/versatile-ab.dts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@
110110
interrupt-parent = <&vic>;
111111
interrupts = <31>; /* Cascaded to vic */
112112
clear-mask = <0xffffffff>;
113-
valid-mask = <0xffc203f8>;
113+
/*
114+
* Valid interrupt lines mask according to
115+
* table 4-36 page 4-50 of ARM DUI 0225D
116+
*/
117+
valid-mask = <0x0760031b>;
114118
};
115119

116120
dma@10130000 {
@@ -266,8 +270,8 @@
266270
};
267271
mmc@5000 {
268272
compatible = "arm,pl180", "arm,primecell";
269-
reg = < 0x5000 0x1000>;
270-
interrupts-extended = <&vic 22 &sic 2>;
273+
reg = <0x5000 0x1000>;
274+
interrupts-extended = <&vic 22 &sic 1>;
271275
clocks = <&xtal24mhz>, <&pclk>;
272276
clock-names = "mclk", "apb_pclk";
273277
};

arch/arm/boot/dts/versatile-pb.dts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
compatible = "arm,versatile-pb";
66

77
amba {
8+
/* The Versatile PB is using more SIC IRQ lines than the AB */
9+
sic: intc@10003000 {
10+
clear-mask = <0xffffffff>;
11+
/*
12+
* Valid interrupt lines mask according to
13+
* figure 3-30 page 3-74 of ARM DUI 0224B
14+
*/
15+
valid-mask = <0x7fe003ff>;
16+
};
17+
818
gpio2: gpio@101e6000 {
919
compatible = "arm,pl061", "arm,primecell";
1020
reg = <0x101e6000 0x1000>;
@@ -67,6 +77,13 @@
6777
};
6878

6979
fpga {
80+
mmc@5000 {
81+
/*
82+
* Overrides the interrupt assignment from
83+
* the Versatile AB board file.
84+
*/
85+
interrupts-extended = <&sic 22 &sic 23>;
86+
};
7087
uart@9000 {
7188
compatible = "arm,pl011", "arm,primecell";
7289
reg = <0x9000 0x1000>;
@@ -86,7 +103,8 @@
86103
mmc@b000 {
87104
compatible = "arm,pl180", "arm,primecell";
88105
reg = <0xb000 0x1000>;
89-
interrupts-extended = <&vic 23 &sic 2>;
106+
interrupt-parent = <&sic>;
107+
interrupts = <1>, <2>;
90108
clocks = <&xtal24mhz>, <&pclk>;
91109
clock-names = "mclk", "apb_pclk";
92110
};

0 commit comments

Comments
 (0)