R8A7778/BOCK-W: HPB-DMAC support for SDHI0
cover R8A7778/BOCK-W: HPB-DMAC support for SDHI0
Hello.
Here's the set of 3 patches against the Simon Horman's 'renesas.git' repo,
'renesas-next-20130628' tag. Here we add the HPB-DMAC platform code working on the R8A7778 and enable DMA for SDHI0 on BOCK-W. The patchset depends on the R-Car HPB-DMAC driver patch posted earlier.
[1/3] ARM: shmobile: use common platform header for HPB-DMAC [2/3] ARM: shmobile: r8a7778: add HPB-DMAC support [3/3] ARM: shmobile: BOCK-W: enable DMA for SDHI0
WBR, Sergei
PATCH 1/3 ARM: shmobile: use common platform header for HPB-DMAC
From: Max Filippov <[email protected]>
Use previously empty <mach/dma.h> to declare HPB-DMA slave IDs.
--- arch/arm/mach-shmobile/include/mach/dma.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/include/mach/dma.h +24 -1
@@ -1 +1,24 @@ -/* empty */ +/* +* Copyright (C) 2011-2013 Renesas Electronics Corporation +* Copyright (C) 2013 Cogent Embedded, Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 +* as published by the Free Software Foundation. +*/ + +#ifndef __MACH_DMA_H +#define __MACH_DMA_H + +/* HPB-DMA slave IDs */ +enum { +HPBDMA_SLAVE_DUMMY , +HPBDMA_SLAVE_SDHI0_TX , +HPBDMA_SLAVE_SDHI0_RX , +HPBDMA_SLAVE_SSI0_TX_ST , +HPBDMA_SLAVE_SSI0_TX_MN , +HPBDMA_SLAVE_SSI1_RX_ST , +HPBDMA_SLAVE_SSI1_RX_MN , +}; + +#endif /* __MACH_DMA_H */
PATCH 1/3 ARM: shmobile: use common platform header for HPB-DMAC
Hi
Quoted 30 lines
From: Max Filippov <[email protected]>
Use previously empty <
mach/dma.h> to declare HPB-DMA slave IDs.Signed-off-by Max Filippov <[email protected]>[Sergei: changed the guard macro name, fixed comment, extended copyright.]Signed-off-by Sergei Shtylyov <[email protected]>--- arch/arm/mach-shmobile/include/mach/dma.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)Index:
renesas/arch/arm/mach-shmobile/include/mach/dma.h
===================================================================arch/arm/mach-shmobile/include/mach/dma.h +12
-1@@ -1 +1,24 @@ -/* empty */ +/* +* Copyright (C) 2011-2013 Renesas Electronics Corporation +* Copyright (C) 2013 Cogent Embedded, Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 +* as published by the Free Software Foundation. +*/ + +#ifndef __MACH_DMA_H +#define __MACH_DMA_H +
arch/arm/mach-shmobile/include/mach/dma.h line 22
Quoted 10 lines
arch/arm/mach-shmobile/include/mach/dma.h +10
-0+/* HPB-DMA slave IDs */ +enum { +HPBDMA_SLAVE_DUMMY , +HPBDMA_SLAVE_SDHI0_TX , +HPBDMA_SLAVE_SDHI0_RX , +HPBDMA_SLAVE_SSI0_TX_ST , +HPBDMA_SLAVE_SSI0_TX_MN , +HPBDMA_SLAVE_SSI1_RX_ST , +HPBDMA_SLAVE_SSI1_RX_MN , +};
it should be in r8a7778.h
Best regards
---
Kuninori Morimoto
PATCH 1/3 ARM: shmobile: use common platform header for HPB-DMAC
Hello.
Quoted 34 lines · Kuninori Morimoto
Quoted 34 lines
From: Max Filippov <[email protected]>
Use previously empty <
mach/dma.h> to declare HPB-DMA slave IDs.Signed-off-by Max Filippov <[email protected]>[Sergei: changed the guard macro name, fixed comment, extended copyright.]Signed-off-by Sergei Shtylyov <[email protected]>--- arch/arm/mach-shmobile/include/mach/dma.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)Index:
renesas/arch/arm/mach-shmobile/include/mach/dma.h
===================================================================arch/arm/mach-shmobile/include/mach/dma.h +16
-1@@ -1 +1,24 @@ -/* empty */ +/* +* Copyright (C) 2011-2013 Renesas Electronics Corporation +* Copyright (C) 2013 Cogent Embedded, Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 +* as published by the Free Software Foundation. +*/ + +#ifndef __MACH_DMA_H +#define __MACH_DMA_H + +/* HPB-DMA slave IDs */ +enum { +HPBDMA_SLAVE_DUMMY , + HPBDMA_SLAVE_SDHI0_TX,
Quoted 8 lines
arch/arm/mach-shmobile/include/mach/dma.h line 22
Quoted 6 lines
arch/arm/mach-shmobile/include/mach/dma.h +6
-0+HPBDMA_SLAVE_SDHI0_RX , +HPBDMA_SLAVE_SSI0_TX_ST , +HPBDMA_SLAVE_SSI0_TX_MN , +HPBDMA_SLAVE_SSI1_RX_ST , + HPBDMA_SLAVE_SSI1_RX_MN, +};it should be in
r8a7778.h
It will be shared with R8A7779.
WBR, Sergei
PATCH 1/3 ARM: shmobile: use common platform header for HPB-DMAC
Hello.
Quoted 43 lines · Sergei Shtylyov
Quoted 34 lines
Quoted 34 lines
From: Max Filippov <[email protected]>
Use previously empty <
mach/dma.h> to declare HPB-DMA slave IDs.Signed-off-by Max Filippov <[email protected]>[Sergei: changed the guard macro name, fixed comment, extended copyright.]Signed-off-by Sergei Shtylyov <[email protected]>--- arch/arm/mach-shmobile/include/mach/dma.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)Index:
renesas/arch/arm/mach-shmobile/include/mach/dma.h
===================================================================arch/arm/mach-shmobile/include/mach/dma.h +16
-1@@ -1 +1,24 @@ -/* empty */ +/* +* Copyright (C) 2011-2013 Renesas Electronics Corporation +* Copyright (C) 2013 Cogent Embedded, Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 +* as published by the Free Software Foundation. +*/ + +#ifndef __MACH_DMA_H +#define __MACH_DMA_H + +/* HPB-DMA slave IDs */ +enum { +HPBDMA_SLAVE_DUMMY , + HPBDMA_SLAVE_SDHI0_TX,Quoted 8 lines
arch/arm/mach-shmobile/include/mach/dma.h line 22
Quoted 6 lines
arch/arm/mach-shmobile/include/mach/dma.h +6
-0+HPBDMA_SLAVE_SDHI0_RX , +HPBDMA_SLAVE_SSI0_TX_ST , +HPBDMA_SLAVE_SSI0_TX_MN , +HPBDMA_SLAVE_SSI1_RX_ST , + HPBDMA_SLAVE_SSI1_RX_MN, +};it should be in
r8a7778.h
Quoted 1 line
It will be shared with R8A7779.
Apparently not anymore as this file is gone now.
WBR, Sergei
Magnus Damm
maintainerPATCH 1/3 ARM: shmobile: use common platform header for HPB-DMAC
In reply to Sergei ShtylyovHi Sergei,
Quoted 11 lines · Sergei Shtylyov
From: Max Filippov <[email protected]>
Use previously empty <
mach/dma.h> to declare HPB-DMA slave IDs.Signed-off-by Max Filippov <[email protected]>[Sergei: changed the guard macro name, fixed comment, extended copyright.]Signed-off-by Sergei Shtylyov <[email protected]>--- arch/arm/mach-shmobile/include/mach/dma.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)
Thanks for your patch. Can you please explain the reason why you put this shared information under mach/?
Quoted 1 line
From my point of view we should really have as few special things as
possible under mach/. Starting to share DMA stuff here looks special. I would like mach-shmobile to be as standard as possible (basically only ARM code in the future), and in the case we have I/O devices or other IOMMUs or DMA controllers then we should use include/linux or that recently added platform data directory if needed. We need to make sure that our headers stay compatible with multiplatform support.
I realize you may want to share this header between multiple SoCs, but I really want to avoid creating local common code under arch/arm/ that has nothing to do with ARM. Also, this is IMO a total non-issue, instead of merging code and making back porting more difficult for any particular SoC, then how about spending effort on the ling term instead, like DMA DT?
So my recommendation is to keep this information together with each SoC. And also work on DT. In between have a coffee or work on DT, but please do not spend time on merging short term per-SoC information and making back porting more difficult.
Thanks,
/ magnus
PATCH 1/3 ARM: shmobile: use common platform header for HPB-DMAC
Hello.
Quoted 8 lines · Magnus Damm
Quoted 7 lines
From: Max Filippov <[email protected]>
Use previously empty <
mach/dma.h> to declare HPB-DMA slave IDs.Signed-off-by Max Filippov <[email protected]>[Sergei: changed the guard macro name, fixed comment, extended copyright.]Signed-off-by Sergei Shtylyov <[email protected]>
Quoted 6 lines
Quoted 3 lines
--- arch/arm/mach-shmobile/include/mach/dma.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)Thanks for your patch. Can you please explain the reason why you put this shared information under mach/?
I'm afraid that's more a question to the original author, Phil Edworthy.
He put this stuff into <mach/hpb-dmae.h>.
Quoted 15 lines
From my point of view we should really have as few special things as
possible under mach/. Starting to share DMA stuff here looks special. I would like mach-shmobile to be as standard as possible (basically only ARM code in the future), and in the case we have I/O devices or other IOMMUs or DMA controllers then we should useinclude/linuxor that recently added platform data directory if needed. We need to make sure that our headers stay compatible with multiplatform support.I realize you may want to share this header between multiple SoCs, but I really want to avoid creating local common code under
arch/arm/that has nothing to do with ARM. Also, this is IMO a total non-issue, instead of merging code and making back porting more difficult for any particular SoC, then how about spending effort on the ling term instead, like DMA DT?
Quoted 4 lines
So my recommendation is to keep this information together with each SoC. And also work on DT. In between have a coffee or work on DT, but please do not spend time on merging short term per-SoC information and making back porting more difficult.
OK. DT would be a next step I guess.
Quoted 3 lines
Thanks,
/ magnus
WBR, Sergei
PATCH 1/3 ARM: shmobile: use common platform header for HPB-DMAC
Hi
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
From: Max Filippov <[email protected]>
Use previously empty <
mach/dma.h> to declare HPB-DMA slave IDs.Signed-off-by Max Filippov <[email protected]>[Sergei: changed the guard macro name, fixed comment, extended copyright.]Signed-off-by Sergei Shtylyov <[email protected]>--- arch/arm/mach-shmobile/include/mach/dma.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)
Quoted 5 lines
Quoted 2 lines
Thanks for your patch. Can you please explain the reason why you put this shared information under mach/?
I'm afraid that's more a question to the original author, Phil Edworthy.
He put this stuff into <mach/hpb-dmae.h>.
Then, why you could send this patch instead of original author, even though you can't answer any question about it ?
Best regards
---
Kuninori Morimoto
PATCH 1/3 ARM: shmobile: use common platform header for HPB-DMAC
Hello.
Quoted 12 lines · Kuninori Morimoto
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
From: Max Filippov <[email protected]>
Use previously empty <
mach/dma.h> to declare HPB-DMA slave IDs.Signed-off-by Max Filippov <[email protected]>[Sergei: changed the guard macro name, fixed comment, extended copyright.]Signed-off-by Sergei Shtylyov <[email protected]>--- arch/arm/mach-shmobile/include/mach/dma.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Thanks for your patch. Can you please explain the reason why you put this shared information under mach/?
I'm afraid that's more a question to the original author, Phil Edworthy.
He put this stuff into <mach/hpb-dmae.h>.Then, why you could send this patch instead of original author,
Ask Phil why didn't he upstream his stuff. We, unlike him, do have
obligation to upstream it.
Quoted 1 line
even though you can't answer any question about it ?
I'm not the author of the patch, let me remind you, Max Filippov is.
He was on vacations.
Quoted 3 lines
Best regards
---
Kuninori Morimoto
WBR, Sergei
PATCH 1/3 ARM: shmobile: use common platform header for HPB-DMAC
Hello.
Quoted 8 lines · Sergei Shtylyov
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
From: Max Filippov <[email protected]>
Use previously empty <
mach/dma.h> to declare HPB-DMA slave IDs.Signed-off-by Max Filippov <[email protected]>[Sergei: changed the guard macro name, fixed comment, extended copyright.]Signed-off-by Sergei Shtylyov <[email protected]>
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
--- arch/arm/mach-shmobile/include/mach/dma.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)Thanks for your patch. Can you please explain the reason why you put this shared information under mach/?
IIUC, because the only 2 file using it were under arch/arm/mach-shmobile/.
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
I'm afraid that's more a question to the original author, Phil Edworthy.
He put this stuff into <mach/hpb-dmae.h>.Then, why you could send this patch instead of original author,
Quoted 7 lines
Ask Phil why didn't he upstream his stuff. We, unlike him, do have
obligation to upstream it.Quoted 1 line
even though you can't answer any question about it ?
I'm not the author of the patch, let me remind you, Max Filippov is.
He was on vacations.
Phil's patches were only for R8A7778, IIRC (yet, the platfrom DMA code was
placed in a separate file, not r8a7778.c). Max decided to use the <mach/hpb-dmae.h> header for sharing the DMA channel IDs between R8A777[89], I agreed but suggested to use the empty <mach/dma.h> instead.
Quoted 3 lines
Quoted 3 lines
Best regards
---
Kuninori Morimoto
WBR, Sergei
PATCH 2/3 ARM: shmobile: r8a7778: add HPB-DMAC support
In reply to Sergei ShtylyovFrom: Max Filippov <[email protected]>
Add HPB-DMAC platform device on R8A7778 SoC along with its slave and channel configurations.
--- arch/arm/mach-shmobile/setup-r8a7778.c | 115 +++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+)
arch/arm/mach-shmobile/setup-r8a7778.c +115 -0
@@ -24,6 +24,7 @@#include <linux/irqchip/arm-gic.h> #include <linux/of.h> #include <linux/of_platform.h> +#include <linux/platform_data/dma-rcar-hpbdma.h> #include <linux/platform_data/gpio-rcar.h> #include <linux/platform_data/irq-renesas-intc-irqpin.h> #include <linux/platform_device.h>
@@ -36,6 +37,7 @@#include <linux/usb/ehci_pdriver.h> #include <linux/usb/ohci_pdriver.h> #include <linux/dma-mapping.h> +#include <mach/dma.h> #include <mach/irqs.h> #include <mach/r8a7778.h> #include <mach/common.h>
@@ -333,6 +335,118 @@ void __init r8a7778_add_mmc_device(struc info, sizeof(*info)); } +/* HPB-DMA */ + +/* Asynchronous mode register (ASYNCMDR) bits */ +#define ASYNCMDR_ASMD22_MASK BIT(2)/* SDHI0 */ +#define ASYNCMDR_ASMD22_SINGLE BIT(2)/* SDHI0 */ +#define ASYNCMDR_ASMD22_MULTI 0/* SDHI0 */ +#define ASYNCMDR_ASMD21_MASK BIT(1)/* SDHI0 */ +#define ASYNCMDR_ASMD21_SINGLE BIT(1)/* SDHI0 */ +#define ASYNCMDR_ASMD21_MULTI 0/* SDHI0 */ + +static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = { + { + .id =HPBDMA_SLAVE_SDHI0_TX , + .addr =0xffe4c000 +0x30 , + .dcr =DCR_SPDS_16BIT |DCR_DMDL |DCR_DPDS_16BIT , + .rstr =ASYNCRSTR_ASRST21 |ASYNCRSTR_ASRST22 | +ASYNCRSTR_ASRST23 , + .mdr =ASYNCMDR_ASMD21_SINGLE , + .mdm =ASYNCMDR_ASMD21_MASK , + .port =0x0D0C , + .flags =HPB_DMAE_SET_ASYNC_RESET |HPB_DMAE_SET_ASYNC_MODE , + .dma_ch =21 , + }, { + .id =HPBDMA_SLAVE_SDHI0_RX , + .addr =0xffe4c000 +0x30 , + .dcr =DCR_SMDL |DCR_SPDS_16BIT |DCR_DPDS_16BIT , + .rstr =ASYNCRSTR_ASRST21 |ASYNCRSTR_ASRST22 | +ASYNCRSTR_ASRST23 , + .mdr =ASYNCMDR_ASMD22_SINGLE , + .mdm =ASYNCMDR_ASMD22_MASK , + .port =0x0D0C , + .flags =HPB_DMAE_SET_ASYNC_RESET |HPB_DMAE_SET_ASYNC_MODE , + .dma_ch =22 , + }, { + .id =HPBDMA_SLAVE_SSI0_TX_ST , + .addr =0xffd90000 +0x1008 , + .dcr =DCR_CT |DCR_DIP |DCR_SPDS_32BIT |DCR_DMDL | +DCR_DPDS_32BIT , + .port =0x0000 , + .dma_ch =28 , + }, { + .id =HPBDMA_SLAVE_SSI0_TX_MN , + .addr =0xffd90000 +0x1008 , + .dcr =DCR_CT |DCR_DIP |DCR_SPDS_16BIT |DCR_DMDL | +DCR_DPDS_16BIT , + .port =0x0000 , + .dma_ch =28 , + }, { + .id =HPBDMA_SLAVE_SSI1_RX_ST , + .addr =0xffd90000 +0x104c , + .dcr =DCR_CT |DCR_DIP |DCR_SMDL |DCR_SPDS_32BIT | +DCR_DPDAM |DCR_DPDS_32BIT , + .port =0x0101 , + .dma_ch =29 , + }, { + .id =HPBDMA_SLAVE_SSI1_RX_MN , + .addr =0xffd90000 +0x104c , + .dcr =DCR_CT |DCR_DIP |DCR_SMDL |DCR_SPDS_16BIT | +DCR_DPDAM |DCR_DPDS_16BIT , + .port =0x0101 , + .dma_ch =29 , + }, +}; + +static const struct hpb_dmae_channel hpb_dmae_channels[] = { +/* ch.21 SD0 */ +HPB_DMAE_CHANNEL (0x7e ,HPBDMA_SLAVE_SDHI0_TX ), +/* ch.22 SD0 */ +HPB_DMAE_CHANNEL (0x7e ,HPBDMA_SLAVE_SDHI0_RX ), +/* ch.28 SSI0 */ +HPB_DMAE_CHANNEL (0x7f ,HPBDMA_SLAVE_SSI0_TX_ST ), +HPB_DMAE_CHANNEL (0x7f ,HPBDMA_SLAVE_SSI0_TX_MN ), +/* ch.29 SSI1 */ +HPB_DMAE_CHANNEL (0x7f ,HPBDMA_SLAVE_SSI1_RX_ST ), +HPB_DMAE_CHANNEL (0x7f ,HPBDMA_SLAVE_SSI1_RX_MN ), +}; + +static struct hpb_dmae_pdata dma_platform_data__initdata = { + .slaves = hpb_dmae_slaves, + .num_slaves =ARRAY_SIZE (hpb_dmae_slaves), + .channels = hpb_dmae_channels, + .num_channels =ARRAY_SIZE (hpb_dmae_channels), + .ts_shift = { + [XMIT_SZ_8BIT ] =0 , + [XMIT_SZ_16BIT ] =1 , + [XMIT_SZ_32BIT ] =2 , + }, + .num_hw_channels =39 , +}; + +static struct resource hpb_dmae_resources[]__initdata = { +/* Channel registers */ +DEFINE_RES_MEM (0xffc08000 ,0x1000 ), +/* Common registers */ +DEFINE_RES_MEM (0xffc09000 ,0x170 ), +/* Asynchronous reset registers */ +DEFINE_RES_MEM (0xffc00300 ,4 ), +/* Asynchronous mode registers */ +DEFINE_RES_MEM (0xffc00400 ,4 ), +/* IRQ for DMA channels */ +DEFINE_RES_NAMED (gic_iid (0x7b ),5 ,NULL ,IORESOURCE_IRQ ), +}; + +static void __init r8a7778_register_hpb_dmae (void ) +{ +platform_device_register_resndata (&platform_bus,"hpb-dma-engine" ,-1 , + hpb_dmae_resources, +ARRAY_SIZE (hpb_dmae_resources), + &dma_platform_data, +sizeof (dma_platform_data)); +} +void __init r8a7778_add_standard_devices (void ) {int i;
@@ -355,6 +469,7 @@ void __init r8a7778_add_standard_devicesr8a7778_register_tmu (0 );r8a7778_register_tmu (1 ); +r8a7778_register_hpb_dmae (); }void __init r8a7778_init_late (void )
PATCH 2/3 ARM: shmobile: r8a7778: add HPB-DMAC support
Hi
Quoted 9 lines
From: Max Filippov <[email protected]>
Add HPB-DMAC platform device on R8A7778 SoC along with its slave and channel configurations.
Signed-off-by Max Filippov <[email protected]>Signed-off-by Sergei Shtylyov <[email protected]>---
(snip)
Quoted 43 lines
arch/arm/mach-shmobile/setup-r8a7778.c +43
-0+static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = { + { + .id =HPBDMA_SLAVE_SDHI0_TX , + .addr =0xffe4c000 +0x30 , + .dcr =DCR_SPDS_16BIT |DCR_DMDL |DCR_DPDS_16BIT , + .rstr =ASYNCRSTR_ASRST21 |ASYNCRSTR_ASRST22 | +ASYNCRSTR_ASRST23 , + .mdr =ASYNCMDR_ASMD21_SINGLE , + .mdm =ASYNCMDR_ASMD21_MASK , + .port =0x0D0C , + .flags =HPB_DMAE_SET_ASYNC_RESET |HPB_DMAE_SET_ASYNC_MODE , + .dma_ch =21 , + }, { + .id =HPBDMA_SLAVE_SDHI0_RX , + .addr =0xffe4c000 +0x30 , + .dcr =DCR_SMDL |DCR_SPDS_16BIT |DCR_DPDS_16BIT , + .rstr =ASYNCRSTR_ASRST21 |ASYNCRSTR_ASRST22 | +ASYNCRSTR_ASRST23 , + .mdr =ASYNCMDR_ASMD22_SINGLE , + .mdm =ASYNCMDR_ASMD22_MASK , + .port =0x0D0C , + .flags =HPB_DMAE_SET_ASYNC_RESET |HPB_DMAE_SET_ASYNC_MODE , + .dma_ch =22 , + }, { + .id =HPBDMA_SLAVE_SSI0_TX_ST , + .addr =0xffd90000 +0x1008 , + .dcr =DCR_CT |DCR_DIP |DCR_SPDS_32BIT |DCR_DMDL | +DCR_DPDS_32BIT , + .port =0x0000 , + .dma_ch =28 , + }, { + .id =HPBDMA_SLAVE_SSI0_TX_MN , + .addr =0xffd90000 +0x1008 , + .dcr =DCR_CT |DCR_DIP |DCR_SPDS_16BIT |DCR_DMDL | +DCR_DPDS_16BIT , + .port =0x0000 , + .dma_ch =28 , + }, { + .id =HPBDMA_SLAVE_SSI1_RX_ST , + .addr =0xffd90000 +0x104c , + .dcr =DCR_CT |DCR_DIP |DCR_SMDL |DCR_SPDS_32BIT | +DCR_DPDAM |DCR_DPDS_32BIT , + .port =0x0101 ,
arch/arm/mach-shmobile/setup-r8a7778.c void __init r8a7778_add_mmc_device(struc · line 400
Quoted 10 lines
arch/arm/mach-shmobile/setup-r8a7778.c +10
-0+ .dma_ch = 29, + }, { + .id = HPBDMA_SLAVE_SSI1_RX_MN, + .addr = 0xffd90000 + 0x104c, + .dcr = DCR_CT | DCR_DIP | DCR_SMDL | DCR_SPDS_16BIT | + DCR_DPDAM | DCR_DPDS_16BIT, + .port = 0x0101, + .dma_ch = 29, + }, +};
How did you test SSI ?
remove these
Best regards
---
Kuninori Morimoto
PATCH 2/3 ARM: shmobile: r8a7778: add HPB-DMAC support
Hello.
Quoted 58 lines · Kuninori Morimoto
Quoted 9 lines
From: Max Filippov <[email protected]>
Add HPB-DMAC platform device on R8A7778 SoC along with its slave and channel configurations.
Signed-off-by Max Filippov <[email protected]>Signed-off-by Sergei Shtylyov <[email protected]>---
(snip)
Quoted 48 lines
arch/arm/mach-shmobile/setup-r8a7778.c +48
-0+static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = { + { + .id =HPBDMA_SLAVE_SDHI0_TX , + .addr =0xffe4c000 +0x30 , + .dcr =DCR_SPDS_16BIT |DCR_DMDL |DCR_DPDS_16BIT , + .rstr =ASYNCRSTR_ASRST21 |ASYNCRSTR_ASRST22 | +ASYNCRSTR_ASRST23 , + .mdr =ASYNCMDR_ASMD21_SINGLE , + .mdm =ASYNCMDR_ASMD21_MASK , + .port =0x0D0C , + .flags =HPB_DMAE_SET_ASYNC_RESET |HPB_DMAE_SET_ASYNC_MODE , + .dma_ch =21 , + }, { + .id =HPBDMA_SLAVE_SDHI0_RX , + .addr =0xffe4c000 +0x30 , + .dcr =DCR_SMDL |DCR_SPDS_16BIT |DCR_DPDS_16BIT , + .rstr =ASYNCRSTR_ASRST21 |ASYNCRSTR_ASRST22 | +ASYNCRSTR_ASRST23 , + .mdr =ASYNCMDR_ASMD22_SINGLE , + .mdm =ASYNCMDR_ASMD22_MASK , + .port =0x0D0C , + .flags =HPB_DMAE_SET_ASYNC_RESET |HPB_DMAE_SET_ASYNC_MODE , + .dma_ch =22 , + }, { + .id =HPBDMA_SLAVE_SSI0_TX_ST , + .addr =0xffd90000 +0x1008 , + .dcr =DCR_CT |DCR_DIP |DCR_SPDS_32BIT |DCR_DMDL | +DCR_DPDS_32BIT , + .port =0x0000 , + .dma_ch =28 , + }, { + .id =HPBDMA_SLAVE_SSI0_TX_MN , + .addr =0xffd90000 +0x1008 , + .dcr =DCR_CT |DCR_DIP |DCR_SPDS_16BIT |DCR_DMDL | +DCR_DPDS_16BIT , + .port =0x0000 , + .dma_ch =28 , + }, { + .id =HPBDMA_SLAVE_SSI1_RX_ST , + .addr =0xffd90000 +0x104c , + .dcr =DCR_CT |DCR_DIP |DCR_SMDL |DCR_SPDS_32BIT | +DCR_DPDAM |DCR_DPDS_32BIT , + .port =0x0101 , + .dma_ch =29 , + }, { + .id =HPBDMA_SLAVE_SSI1_RX_MN , + .addr =0xffd90000 +0x104c , + .dcr = DCR_CT | DCR_DIP | DCR_SMDL | DCR_SPDS_16BIT |
Quoted 8 lines
arch/arm/mach-shmobile/setup-r8a7778.c void __init r8a7778_add_mmc_device(struc · line 400
Quoted 5 lines
arch/arm/mach-shmobile/setup-r8a7778.c +5
-0+ DCR_DPDAM | DCR_DPDS_16BIT, + .port = 0x0101, + .dma_ch = 29, + }, +};How did you test SSI ?
remove these
OK. The SSI stuff came from the original patch.
Quoted 3 lines
Best regards
---
Kuninori Morimoto
WBR, Sergei
PATCH 3/3 ARM: shmobile: BOCK-W: enable DMA for SDHI0
In reply to Sergei ShtylyovFrom: Max Filippov <[email protected]>
Pass HPB-DMA slave IDs in the SDHI0 platform data to enable DMA in the SDHI driver.
--- arch/arm/mach-shmobile/board-bockw.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-shmobile/board-bockw.c +3 -0
@@ -29,6 +29,7 @@#include <linux/spi/spi.h> #include <linux/spi/flash.h> #include <mach/common.h> +#include <mach/dma.h> #include <mach/irqs.h> #include <mach/r8a7778.h> #include <asm/mach/arch.h>
@@ -78,6 +79,8 @@ static struct resource smsc911x_resource/* SDHI */ static struct sh_mobile_sdhi_info sdhi0_info = { + .dma_slave_tx =HPBDMA_SLAVE_SDHI0_TX , + .dma_slave_rx =HPBDMA_SLAVE_SDHI0_RX , .tmio_caps =MMC_CAP_SD_HIGHSPEED , .tmio_ocr_mask =MMC_VDD_165_195 |MMC_VDD_32_33 |MMC_VDD_33_34 , .tmio_flags =TMIO_MMC_HAS_IDLE_WAIT ,
cover R8A7778/BOCK-W: HPB-DMAC support for SDHI0
In reply to Sergei ShtylyovQuoted 10 lines · Sergei Shtylyov
Hello.
Here's the set of 3 patches against the Simon Horman's 'renesas.git' repo,
'renesas-next-20130628' tag. Here we add the HPB-DMAC platform code working on the R8A7778 and enable DMA for SDHI0 on BOCK-W. The patchset depends on the R-Car HPB-DMAC driver patch posted earlier.[1/3] ARM: shmobile: use common platform header for HPB-DMAC [2/3] ARM: shmobile: r8a7778: add HPB-DMAC support [3/3] ARM: shmobile: BOCK-W: enable DMA for SDHI0
Hi Magnus, Hi Morimoto-san,
could you please review is series?