diff mbox

[3/8] spi: sh-msiof: Fix MSIOF address for DMAC

Message ID 20170906070507.26223-4-dirk.behme@de.bosch.com (mailing list archive)
State Rejected
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Dirk Behme Sept. 6, 2017, 7:05 a.m. UTC
From: Ryo Kataoka <ryo.kataoka.wt@renesas.com>

MSIOF Base Address H'E6xx can be accessed by CPU and DMAC.
MSIOF Base Address H'E7xx for DMAC was removed from H/W manual.

Signed-off-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
---
 drivers/spi/spi-sh-msiof.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Geert Uytterhoeven Sept. 6, 2017, 9:22 a.m. UTC | #1
Hi Dirk,

On Wed, Sep 6, 2017 at 9:05 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> From: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
>
> MSIOF Base Address H'E6xx can be accessed by CPU and DMAC.
> MSIOF Base Address H'E7xx for DMAC was removed from H/W manual.
>
> Signed-off-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
> Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>

NAKed-by: Geert Uytterhoeven <geert+renesas@glider.be>

The MSIOF Base Address for DMAC was removed only from the R-Car Gen2/Gen3
manuals. It still affects e.g. R-Mobile APE6.

(I'll reply to the other patches when I find some time).

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
Dirk Behme Sept. 6, 2017, 10:09 a.m. UTC | #2
On 06.09.2017 11:22, Geert Uytterhoeven wrote:
> Hi Dirk,
> 
> On Wed, Sep 6, 2017 at 9:05 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
>> From: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
>>
>> MSIOF Base Address H'E6xx can be accessed by CPU and DMAC.
>> MSIOF Base Address H'E7xx for DMAC was removed from H/W manual.
>>
>> Signed-off-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
>> Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
>> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
> 
> NAKed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> The MSIOF Base Address for DMAC was removed only from the R-Car Gen2/Gen3
> manuals. It still affects e.g. R-Mobile APE6.


Do we have a nice run time detection for that?


Best regards

Dirk
Geert Uytterhoeven Sept. 6, 2017, 10:42 a.m. UTC | #3
Hi Dirk,

On Wed, Sep 6, 2017 at 12:09 PM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> On 06.09.2017 11:22, Geert Uytterhoeven wrote:
>> On Wed, Sep 6, 2017 at 9:05 AM, Dirk Behme <dirk.behme@de.bosch.com>
>> wrote:
>>>
>>> From: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
>>>
>>> MSIOF Base Address H'E6xx can be accessed by CPU and DMAC.
>>> MSIOF Base Address H'E7xx for DMAC was removed from H/W manual.
>>>
>>> Signed-off-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
>>> Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
>>> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
>>
>>
>> NAKed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>>
>> The MSIOF Base Address for DMAC was removed only from the R-Car Gen2/Gen3
>> manuals. It still affects e.g. R-Mobile APE6.
>
> Do we have a nice run time detection for that?

The current driver code just looks at the DTS, cfr. the comment:

    /* The DMA engine uses the second register set, if present */

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
Dirk Behme Sept. 6, 2017, 10:59 a.m. UTC | #4
On 06.09.2017 12:42, Geert Uytterhoeven wrote:
> Hi Dirk,
> 
> On Wed, Sep 6, 2017 at 12:09 PM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
>> On 06.09.2017 11:22, Geert Uytterhoeven wrote:
>>> On Wed, Sep 6, 2017 at 9:05 AM, Dirk Behme <dirk.behme@de.bosch.com>
>>> wrote:
>>>>
>>>> From: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
>>>>
>>>> MSIOF Base Address H'E6xx can be accessed by CPU and DMAC.
>>>> MSIOF Base Address H'E7xx for DMAC was removed from H/W manual.
>>>>
>>>> Signed-off-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
>>>> Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
>>>> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
>>>
>>>
>>> NAKed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>>>
>>> The MSIOF Base Address for DMAC was removed only from the R-Car Gen2/Gen3
>>> manuals. It still affects e.g. R-Mobile APE6.
>>
>> Do we have a nice run time detection for that?
> 
> The current driver code just looks at the DTS, cfr. the comment:
> 
>      /* The DMA engine uses the second register set, if present */


Ok, yes, thanks.

So this patch is completely superfluous, even in the BSP, correct?

Will drop it for the next round, hoping that it doesn't result in too 
much rebase hassle ;)

Best regards

Dirk
Geert Uytterhoeven Sept. 6, 2017, 11:01 a.m. UTC | #5
Hi Dirk,

On Wed, Sep 6, 2017 at 12:59 PM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> On 06.09.2017 12:42, Geert Uytterhoeven wrote:
>> On Wed, Sep 6, 2017 at 12:09 PM, Dirk Behme <dirk.behme@de.bosch.com>
>> wrote:
>>> On 06.09.2017 11:22, Geert Uytterhoeven wrote:
>>>> On Wed, Sep 6, 2017 at 9:05 AM, Dirk Behme <dirk.behme@de.bosch.com>
>>>> wrote:
>>>>> From: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
>>>>>
>>>>> MSIOF Base Address H'E6xx can be accessed by CPU and DMAC.
>>>>> MSIOF Base Address H'E7xx for DMAC was removed from H/W manual.
>>>>>
>>>>> Signed-off-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
>>>>> Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
>>>>> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
>>>>
>>>> NAKed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>>>>
>>>> The MSIOF Base Address for DMAC was removed only from the R-Car
>>>> Gen2/Gen3
>>>> manuals. It still affects e.g. R-Mobile APE6.
>>>
>>> Do we have a nice run time detection for that?
>>
>> The current driver code just looks at the DTS, cfr. the comment:
>>
>>      /* The DMA engine uses the second register set, if present */
>
> Ok, yes, thanks.
>
> So this patch is completely superfluous, even in the BSP, correct?

Correct. But it keeps on popping up, I think this is the third time someone
tried to submit it upstream :-(

> Will drop it for the next round, hoping that it doesn't result in too much
> rebase hassle ;)

OK, thx!

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 mbox

Patch

diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
index f9300fdf41e5..24b49d3ca9a8 100644
--- a/drivers/spi/spi-sh-msiof.c
+++ b/drivers/spi/spi-sh-msiof.c
@@ -1145,10 +1145,7 @@  static int sh_msiof_request_dma(struct sh_msiof_spi_priv *p)
 		return 0;
 	}
 
-	/* The DMA engine uses the second register set, if present */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	if (!res)
-		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
 	master = p->master;
 	master->dma_tx = sh_msiof_request_dma_chan(dev, DMA_MEM_TO_DEV,