Message ID | 20160922213211.7988-3-chris.brandt@renesas.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Simon Horman |
Headers | show |
Hi Chris, On Thu, Sep 22, 2016 at 11:32 PM, Chris Brandt <chris.brandt@renesas.com> wrote: > Signed-off-by: Chris Brandt <chris.brandt@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> (due to lack of documentation about SDHI, for the interrupt numbers only) > --- a/arch/arm/boot/dts/r7s72100.dtsi > +++ b/arch/arm/boot/dts/r7s72100.dtsi > @@ -458,4 +458,32 @@ > #size-cells = <0>; > status = "disabled"; > }; > + > + sdhi0: sd@e804e000 { > + compatible = "renesas,sdhi-r7s72100"; > + reg = <0xe804e000 0x100>; > + interrupts = <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH > + GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH > + GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>; > + Cannot chcck the required order, but the interrupts are called SDHI0_3, SDHI0_0, and SDHI0_1 in the datasheet. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert, > (due to lack of documentation about SDHI, for the interrupt numbers only) > > > --- a/arch/arm/boot/dts/r7s72100.dtsi > > +++ b/arch/arm/boot/dts/r7s72100.dtsi > > @@ -458,4 +458,32 @@ > > #size-cells = <0>; > > status = "disabled"; > > }; > > + > > + sdhi0: sd@e804e000 { > > + compatible = "renesas,sdhi-r7s72100"; > > + reg = <0xe804e000 0x100>; > > + interrupts = <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH > > + GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH > > + GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>; > > + > > Cannot chcck the required order, but the interrupts are called SDHI0_3, > SDHI0_0, and SDHI0_1 in the datasheet. From the hardware manual, "Table 7.3 List of Interrupt IDs": SD host Interface, Channel 0: ----------------------------- SDHI0_3 = ID 302 (302 - 32 = 270) SDHI0_0 = ID 303 (303 - 32 = 271) SDHI0_1 = ID 304 (304 - 32 = 272) #NOTE: The new 3.0 version of the hardware manual that will be coming out will now have the SDHI chapter included. So, in reference to that 3.0 manual: "50.3.3 Interrupt Request and DMA Transfer Request" "Table 50.4 Interrupt Request" ----------------------------- Card detect interrupt = SDHI3 Card access interrupt = SDHI0 SDIO access interrupt = SDHI1 Regardless, in sh_mobile_sdhi.c, they all get mapped to the same ISR function anyway: i = 0; while (1) { irq = platform_get_irq(pdev, i); if (irq < 0) break; i++; ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0, dev_name(&pdev->dev), host); if (ret) goto eirq; } Chris
Hi Chris, On Fri, Sep 23, 2016 at 4:20 PM, Chris Brandt <Chris.Brandt@renesas.com> wrote: >> (due to lack of documentation about SDHI, for the interrupt numbers only) >> >> > --- a/arch/arm/boot/dts/r7s72100.dtsi >> > +++ b/arch/arm/boot/dts/r7s72100.dtsi >> > @@ -458,4 +458,32 @@ >> > #size-cells = <0>; >> > status = "disabled"; >> > }; >> > + >> > + sdhi0: sd@e804e000 { >> > + compatible = "renesas,sdhi-r7s72100"; >> > + reg = <0xe804e000 0x100>; >> > + interrupts = <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH >> > + GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH >> > + GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>; >> > + >> >> Cannot chcck the required order, but the interrupts are called SDHI0_3, >> SDHI0_0, and SDHI0_1 in the datasheet. > > From the hardware manual, "Table 7.3 List of Interrupt IDs": > > SD host Interface, Channel 0: > ----------------------------- > SDHI0_3 = ID 302 (302 - 32 = 270) > SDHI0_0 = ID 303 (303 - 32 = 271) > SDHI0_1 = ID 304 (304 - 32 = 272) > > > #NOTE: The new 3.0 version of the hardware manual that will be coming out will now have the SDHI chapter included. > > So, in reference to that 3.0 manual: > > "50.3.3 Interrupt Request and DMA Transfer Request" > "Table 50.4 Interrupt Request" > ----------------------------- > Card detect interrupt = SDHI3 > Card access interrupt = SDHI0 > SDIO access interrupt = SDHI1 Thanks for checking! However, this is another driver that doesn't document anything about the interrupts in the DT bindings :-( > Regardless, in sh_mobile_sdhi.c, they all get mapped to the same ISR function anyway: > > i = 0; > while (1) { > irq = platform_get_irq(pdev, i); > if (irq < 0) > break; > i++; > ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0, > dev_name(&pdev->dev), host); > if (ret) > goto eirq; > } Uuh, then it doesn't matter much ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi index e97d6d1..8e69399 100644 --- a/arch/arm/boot/dts/r7s72100.dtsi +++ b/arch/arm/boot/dts/r7s72100.dtsi @@ -458,4 +458,32 @@ #size-cells = <0>; status = "disabled"; }; + + sdhi0: sd@e804e000 { + compatible = "renesas,sdhi-r7s72100"; + reg = <0xe804e000 0x100>; + interrupts = <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>; + + clocks = <&mstp12_clks R7S72100_CLK_SDHI0>; + cap-sd-highspeed; + cap-sdio-irq; + bus-width = <4>; + status = "disabled"; + }; + + sdhi1: sd@e804e800 { + compatible = "renesas,sdhi-r7s72100"; + reg = <0xe804e800 0x100>; + interrupts = <GIC_SPI 273 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 274 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>; + + clocks = <&mstp12_clks R7S72100_CLK_SDHI1>; + cap-sd-highspeed; + cap-sdio-irq; + bus-width = <4>; + status = "disabled"; + }; };
Signed-off-by: Chris Brandt <chris.brandt@renesas.com> --- arch/arm/boot/dts/r7s72100.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)