Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: versatile: fix MMC/SD interrupt assignment

Commit 0976c946a610d06e907335b7a3afa6db046f8e1b
"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: 0976c946a610 ("arm/versatile: Fix versatile irq specifications")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>

authored by

Linus Walleij and committed by
Olof Johansson
20f12758 a461a3ec

+26 -4
+7 -3
arch/arm/boot/dts/versatile-ab.dts
··· 110 110 interrupt-parent = <&vic>; 111 111 interrupts = <31>; /* Cascaded to vic */ 112 112 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>; 114 118 }; 115 119 116 120 dma@10130000 { ··· 270 266 }; 271 267 mmc@5000 { 272 268 compatible = "arm,pl180", "arm,primecell"; 273 - reg = < 0x5000 0x1000>; 274 - interrupts-extended = <&vic 22 &sic 2>; 269 + reg = <0x5000 0x1000>; 270 + interrupts-extended = <&vic 22 &sic 1>; 275 271 clocks = <&xtal24mhz>, <&pclk>; 276 272 clock-names = "mclk", "apb_pclk"; 277 273 };
+19 -1
arch/arm/boot/dts/versatile-pb.dts
··· 5 5 compatible = "arm,versatile-pb"; 6 6 7 7 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 + 8 18 gpio2: gpio@101e6000 { 9 19 compatible = "arm,pl061", "arm,primecell"; 10 20 reg = <0x101e6000 0x1000>; ··· 77 67 }; 78 68 79 69 fpga { 70 + mmc@5000 { 71 + /* 72 + * Overrides the interrupt assignment from 73 + * the Versatile AB board file. 74 + */ 75 + interrupts-extended = <&sic 22 &sic 23>; 76 + }; 80 77 uart@9000 { 81 78 compatible = "arm,pl011", "arm,primecell"; 82 79 reg = <0x9000 0x1000>; ··· 103 86 mmc@b000 { 104 87 compatible = "arm,pl180", "arm,primecell"; 105 88 reg = <0xb000 0x1000>; 106 - interrupts-extended = <&vic 23 &sic 2>; 89 + interrupt-parent = <&sic>; 90 + interrupts = <1>, <2>; 107 91 clocks = <&xtal24mhz>, <&pclk>; 108 92 clock-names = "mclk", "apb_pclk"; 109 93 };