* [PATCH 00/11] MMCIF and SDHI DMA support in DT for R-Car H2 and M2
@ 2014-07-15 22:45 Laurent Pinchart
2014-07-15 22:45 ` [PATCH 01/11] mmc: sh_mmcif: Document DT bindings Laurent Pinchart
` (10 more replies)
0 siblings, 11 replies; 23+ messages in thread
From: Laurent Pinchart @ 2014-07-15 22:45 UTC (permalink / raw)
To: linux-sh; +Cc: linux-mmc, Guennadi Liakhovetski, Ian Molton
Hello,
This patch series enables DMA support for the MMCIF and SDHI devices on R-Car
H2 (r8a7790) and M2 (r8a7791) when booting through DT.
The first patch documents DT bindings for the MMCIF device. DT support is
implemented in the driver, but the bindings documentation was missing. Patches
02/11 to 05/11 then fix DMA slave configuration in the MMCIF and SDHI drivers.
Finally patches 06/11 to 11/11 enable DMA support in DT for H2 and M2.
Patches 08/11 to 11/11 depend on the R-Car Gen2 DMAC driver posted to the
dmaengine and linux-sh mailing lists as "[PATCH 0/7] R-Car Gen2 DMA Controller
driver".
The first five patches (driver changes) should go through the DMA engine tree,
while the last six patches (platform changes) should go through the Renesas
tree. If the driver changes could make it to v3.17 merging the platform
changes will be easier.
Laurent Pinchart (11):
mmc: sh_mmcif: Document DT bindings
mmc: sh_mmcif: Fix DMA slave address configuration
mmc: sh_mmcif: Configure DMA slave bus width
mmc: tmio: Configure DMA slave bus width
mmc: tmio: Fix DMA source address
ARM: shmobile: r8a7790: Rename mmcif node to mmc
ARM: shmobile: r8a7791: Add MMCIF0 DT node
ARM: shmobile: r8a7790: Reference DMA channels in MMCIF DT nodes
ARM: shmobile: r8a7791: Reference DMA channels in MMCIF DT node
ARM: shmobile: r8a7790: Reference DMA channels in SDHI DT nodes
ARM: shmobile: r8a7791: Reference DMA channels in SDHI DT nodes
.../devicetree/bindings/mmc/renesas,mmcif.txt | 32 ++++++++++++++++++++++
arch/arm/boot/dts/r8a7790.dtsi | 14 +++++++++-
arch/arm/boot/dts/r8a7791.dtsi | 17 ++++++++++++
drivers/mmc/host/sh_mmcif.c | 13 +++++++--
drivers/mmc/host/tmio_mmc_dma.c | 4 ++-
5 files changed, 75 insertions(+), 5 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 01/11] mmc: sh_mmcif: Document DT bindings
2014-07-15 22:45 [PATCH 00/11] MMCIF and SDHI DMA support in DT for R-Car H2 and M2 Laurent Pinchart
@ 2014-07-15 22:45 ` Laurent Pinchart
2014-07-26 9:39 ` Ulf Hansson
2014-07-15 22:45 ` [PATCH 02/11] mmc: sh_mmcif: Fix DMA slave address configuration Laurent Pinchart
` (9 subsequent siblings)
10 siblings, 1 reply; 23+ messages in thread
From: Laurent Pinchart @ 2014-07-15 22:45 UTC (permalink / raw)
To: linux-sh; +Cc: linux-mmc, Guennadi Liakhovetski, Ian Molton, devicetree
The sh-mmcif driver implements DT support but the bindings are not
documented. Document them.
Cc: devicetree@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
.../devicetree/bindings/mmc/renesas,mmcif.txt | 32 ++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
diff --git a/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
new file mode 100644
index 0000000..299081f
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
@@ -0,0 +1,32 @@
+* Renesas Multi Media Card Interface (MMCIF) Controller
+
+This file documents differences between the core properties in mmc.txt
+and the properties used by the MMCIF device.
+
+
+Required properties:
+
+- compatible: must contain one of the following
+ - "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs
+ - "renesas,mmcif-r8a7790" for the MMCIF found in r8a7790 SoCs
+ - "renesas,mmcif-r8a7791" for the MMCIF found in r8a7791 SoCs
+ - "renesas,sh-mmcif" for the generic MMCIF
+
+- clocks: reference to the functional clock
+
+- dmas: reference to the DMA channels, one per channel name listed in the
+ dma-names property.
+- dma-names: must contain "tx" for the transmit DMA channel and "rx" for the
+ receive DMA channel.
+
+
+Example: R8A7790 (R-Car H2) MMCIF0
+
+ mmcif0: mmc@ee200000 {
+ compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif";
+ reg = <0 0xee200000 0 0x80>;
+ interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp3_clks R8A7790_CLK_MMCIF0>;
+ dmas = <&dmac0 0xd1>, <&dmac0 0xd2>;
+ dma-names = "tx", "rx";
+ };
--
1.8.5.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 02/11] mmc: sh_mmcif: Fix DMA slave address configuration
2014-07-15 22:45 [PATCH 00/11] MMCIF and SDHI DMA support in DT for R-Car H2 and M2 Laurent Pinchart
2014-07-15 22:45 ` [PATCH 01/11] mmc: sh_mmcif: Document DT bindings Laurent Pinchart
@ 2014-07-15 22:45 ` Laurent Pinchart
2014-07-26 9:40 ` Ulf Hansson
2014-07-15 22:45 ` [PATCH 03/11] mmc: sh_mmcif: Configure DMA slave bus width Laurent Pinchart
` (8 subsequent siblings)
10 siblings, 1 reply; 23+ messages in thread
From: Laurent Pinchart @ 2014-07-15 22:45 UTC (permalink / raw)
To: linux-sh; +Cc: linux-mmc, Guennadi Liakhovetski, Ian Molton
Commit e5a233cb647d749de2f188477c9a54b94d90477f ("mmc: sh_mmcif:
Factorize DMA channel request and configuration code") incorrectly
set the destination address for both slave channels instead of setting
the source address for the receive channel. Fix that.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/mmc/host/sh_mmcif.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 656fbba..436d663 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -386,7 +386,7 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
struct sh_mmcif_plat_data *pdata,
enum dma_transfer_direction direction)
{
- struct dma_slave_config cfg;
+ struct dma_slave_config cfg = { 0, };
struct dma_chan *chan;
unsigned int slave_id;
struct resource *res;
@@ -417,8 +417,12 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
/* In the OF case the driver will get the slave ID from the DT */
cfg.slave_id = slave_id;
cfg.direction = direction;
- cfg.dst_addr = res->start + MMCIF_CE_DATA;
- cfg.src_addr = 0;
+
+ if (direction = DMA_DEV_TO_MEM)
+ cfg.src_addr = res->start + MMCIF_CE_DATA;
+ else
+ cfg.dst_addr = res->start + MMCIF_CE_DATA;
+
ret = dmaengine_slave_config(chan, &cfg);
if (ret < 0) {
dma_release_channel(chan);
--
1.8.5.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 03/11] mmc: sh_mmcif: Configure DMA slave bus width
2014-07-15 22:45 [PATCH 00/11] MMCIF and SDHI DMA support in DT for R-Car H2 and M2 Laurent Pinchart
2014-07-15 22:45 ` [PATCH 01/11] mmc: sh_mmcif: Document DT bindings Laurent Pinchart
2014-07-15 22:45 ` [PATCH 02/11] mmc: sh_mmcif: Fix DMA slave address configuration Laurent Pinchart
@ 2014-07-15 22:45 ` Laurent Pinchart
2014-07-26 9:40 ` Ulf Hansson
2014-07-15 22:45 ` [PATCH 04/11] mmc: tmio: " Laurent Pinchart
` (7 subsequent siblings)
10 siblings, 1 reply; 23+ messages in thread
From: Laurent Pinchart @ 2014-07-15 22:45 UTC (permalink / raw)
To: linux-sh; +Cc: linux-mmc, Guennadi Liakhovetski, Ian Molton
The data register is 4 bytes wide, hardcode the DMA transfer size to
4 bytes in both directions.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/mmc/host/sh_mmcif.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 436d663..cc8ae09 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -418,10 +418,13 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
cfg.slave_id = slave_id;
cfg.direction = direction;
- if (direction = DMA_DEV_TO_MEM)
+ if (direction = DMA_DEV_TO_MEM) {
cfg.src_addr = res->start + MMCIF_CE_DATA;
- else
+ cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+ } else {
cfg.dst_addr = res->start + MMCIF_CE_DATA;
+ cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+ }
ret = dmaengine_slave_config(chan, &cfg);
if (ret < 0) {
--
1.8.5.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 04/11] mmc: tmio: Configure DMA slave bus width
2014-07-15 22:45 [PATCH 00/11] MMCIF and SDHI DMA support in DT for R-Car H2 and M2 Laurent Pinchart
` (2 preceding siblings ...)
2014-07-15 22:45 ` [PATCH 03/11] mmc: sh_mmcif: Configure DMA slave bus width Laurent Pinchart
@ 2014-07-15 22:45 ` Laurent Pinchart
2014-07-26 9:41 ` Ulf Hansson
2014-07-15 22:45 ` [PATCH 05/11] mmc: tmio: Fix DMA source address Laurent Pinchart
` (6 subsequent siblings)
10 siblings, 1 reply; 23+ messages in thread
From: Laurent Pinchart @ 2014-07-15 22:45 UTC (permalink / raw)
To: linux-sh; +Cc: linux-mmc, Guennadi Liakhovetski, Ian Molton
Even though some implementations support 4-bytes data register access,
the tmio driver never configures the hardware in such a way and always
performs 2-bytes accesses. Hardcode the DMA transfer size to 2 bytes.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/mmc/host/tmio_mmc_dma.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c
index 03e7b28..eb8f1d5 100644
--- a/drivers/mmc/host/tmio_mmc_dma.c
+++ b/drivers/mmc/host/tmio_mmc_dma.c
@@ -294,6 +294,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
cfg.slave_id = pdata->dma->slave_id_tx;
cfg.direction = DMA_MEM_TO_DEV;
cfg.dst_addr = res->start + (CTL_SD_DATA_PORT << host->pdata->bus_shift);
+ cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
cfg.src_addr = 0;
ret = dmaengine_slave_config(host->chan_tx, &cfg);
if (ret < 0)
@@ -312,6 +313,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
cfg.slave_id = pdata->dma->slave_id_rx;
cfg.direction = DMA_DEV_TO_MEM;
cfg.src_addr = cfg.dst_addr;
+ cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
cfg.dst_addr = 0;
ret = dmaengine_slave_config(host->chan_rx, &cfg);
if (ret < 0)
--
1.8.5.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 05/11] mmc: tmio: Fix DMA source address
2014-07-15 22:45 [PATCH 00/11] MMCIF and SDHI DMA support in DT for R-Car H2 and M2 Laurent Pinchart
` (3 preceding siblings ...)
2014-07-15 22:45 ` [PATCH 04/11] mmc: tmio: " Laurent Pinchart
@ 2014-07-15 22:45 ` Laurent Pinchart
2014-07-16 1:39 ` Kuninori Morimoto
2014-07-15 22:45 ` [PATCH 06/11] ARM: shmobile: r8a7790: Rename mmcif node to mmc Laurent Pinchart
` (5 subsequent siblings)
10 siblings, 1 reply; 23+ messages in thread
From: Laurent Pinchart @ 2014-07-15 22:45 UTC (permalink / raw)
To: linux-sh; +Cc: linux-mmc, Guennadi Liakhovetski, Ian Molton
DMA reads from the data buffer register must be offset by 0x2000
according to the hardware documentation.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/mmc/host/tmio_mmc_dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c
index eb8f1d5..4da7be1 100644
--- a/drivers/mmc/host/tmio_mmc_dma.c
+++ b/drivers/mmc/host/tmio_mmc_dma.c
@@ -312,7 +312,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
if (pdata->dma->chan_priv_rx)
cfg.slave_id = pdata->dma->slave_id_rx;
cfg.direction = DMA_DEV_TO_MEM;
- cfg.src_addr = cfg.dst_addr;
+ cfg.src_addr = cfg.dst_addr + 0x2000;
cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
cfg.dst_addr = 0;
ret = dmaengine_slave_config(host->chan_rx, &cfg);
--
1.8.5.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 06/11] ARM: shmobile: r8a7790: Rename mmcif node to mmc
2014-07-15 22:45 [PATCH 00/11] MMCIF and SDHI DMA support in DT for R-Car H2 and M2 Laurent Pinchart
` (4 preceding siblings ...)
2014-07-15 22:45 ` [PATCH 05/11] mmc: tmio: Fix DMA source address Laurent Pinchart
@ 2014-07-15 22:45 ` Laurent Pinchart
2014-07-15 22:45 ` [PATCH 07/11] ARM: shmobile: r8a7791: Add MMCIF0 DT node Laurent Pinchart
` (4 subsequent siblings)
10 siblings, 0 replies; 23+ messages in thread
From: Laurent Pinchart @ 2014-07-15 22:45 UTC (permalink / raw)
To: linux-sh; +Cc: linux-mmc, Guennadi Liakhovetski, Ian Molton, devicetree
Node names should describe the function of the device, not its IP core
name.
Cc: devicetree@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/boot/dts/r8a7790.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 0f15f7c..4fae298 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -356,7 +356,7 @@
status = "disabled";
};
- mmcif0: mmcif@ee200000 {
+ mmcif0: mmc@ee200000 {
compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif";
reg = <0 0xee200000 0 0x80>;
interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 07/11] ARM: shmobile: r8a7791: Add MMCIF0 DT node
2014-07-15 22:45 [PATCH 00/11] MMCIF and SDHI DMA support in DT for R-Car H2 and M2 Laurent Pinchart
` (5 preceding siblings ...)
2014-07-15 22:45 ` [PATCH 06/11] ARM: shmobile: r8a7790: Rename mmcif node to mmc Laurent Pinchart
@ 2014-07-15 22:45 ` Laurent Pinchart
2014-07-15 22:45 ` [PATCH 08/11] ARM: shmobile: r8a7790: Reference DMA channels in MMCIF DT nodes Laurent Pinchart
` (3 subsequent siblings)
10 siblings, 0 replies; 23+ messages in thread
From: Laurent Pinchart @ 2014-07-15 22:45 UTC (permalink / raw)
To: linux-sh; +Cc: linux-mmc, Guennadi Liakhovetski, Ian Molton
Add the MMCIF0 device to the r8a7791 device tree.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/boot/dts/r8a7791.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index c23e72f..6738bc9 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -365,6 +365,15 @@
#gpio-range-cells = <3>;
};
+ mmcif0: mmc@ee200000 {
+ compatible = "renesas,mmcif-r8a7791", "renesas,sh-mmcif";
+ reg = <0 0xee200000 0 0x80>;
+ interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp3_clks R8A7791_CLK_MMCIF0>;
+ reg-io-width = <4>;
+ status = "disabled";
+ };
+
sdhi0: sd@ee100000 {
compatible = "renesas,sdhi-r8a7791";
reg = <0 0xee100000 0 0x200>;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 08/11] ARM: shmobile: r8a7790: Reference DMA channels in MMCIF DT nodes
2014-07-15 22:45 [PATCH 00/11] MMCIF and SDHI DMA support in DT for R-Car H2 and M2 Laurent Pinchart
` (6 preceding siblings ...)
2014-07-15 22:45 ` [PATCH 07/11] ARM: shmobile: r8a7791: Add MMCIF0 DT node Laurent Pinchart
@ 2014-07-15 22:45 ` Laurent Pinchart
2014-07-15 22:45 ` [PATCH 09/11] ARM: shmobile: r8a7791: Reference DMA channels in MMCIF DT node Laurent Pinchart
` (2 subsequent siblings)
10 siblings, 0 replies; 23+ messages in thread
From: Laurent Pinchart @ 2014-07-15 22:45 UTC (permalink / raw)
To: linux-sh; +Cc: linux-mmc, Guennadi Liakhovetski, Ian Molton
Add references to the transmit and receive DMA channels in the two
MMCIF nodes.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/boot/dts/r8a7790.dtsi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 4fae298..465008a 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -361,6 +361,8 @@
reg = <0 0xee200000 0 0x80>;
interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7790_CLK_MMCIF0>;
+ dmas = <&dmac0 0xd1>, <&dmac0 0xd2>;
+ dma-names = "tx", "rx";
reg-io-width = <4>;
status = "disabled";
};
@@ -370,6 +372,8 @@
reg = <0 0xee220000 0 0x80>;
interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7790_CLK_MMCIF1>;
+ dmas = <&dmac0 0xe1>, <&dmac0 0xe2>;
+ dma-names = "tx", "rx";
reg-io-width = <4>;
status = "disabled";
};
--
1.8.5.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 09/11] ARM: shmobile: r8a7791: Reference DMA channels in MMCIF DT node
2014-07-15 22:45 [PATCH 00/11] MMCIF and SDHI DMA support in DT for R-Car H2 and M2 Laurent Pinchart
` (7 preceding siblings ...)
2014-07-15 22:45 ` [PATCH 08/11] ARM: shmobile: r8a7790: Reference DMA channels in MMCIF DT nodes Laurent Pinchart
@ 2014-07-15 22:45 ` Laurent Pinchart
2014-08-04 8:49 ` Geert Uytterhoeven
2014-07-15 22:45 ` [PATCH 10/11] ARM: shmobile: r8a7790: Reference DMA channels in SDHI DT nodes Laurent Pinchart
2014-07-15 22:45 ` [PATCH 11/11] ARM: shmobile: r8a7791: " Laurent Pinchart
10 siblings, 1 reply; 23+ messages in thread
From: Laurent Pinchart @ 2014-07-15 22:45 UTC (permalink / raw)
To: linux-sh; +Cc: linux-mmc, Guennadi Liakhovetski, Ian Molton
Add references to the transmit and receive DMA channels in the MMCIF
node.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/boot/dts/r8a7791.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index 6738bc9..ff0d415 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -370,6 +370,8 @@
reg = <0 0xee200000 0 0x80>;
interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7791_CLK_MMCIF0>;
+ dmas = <&dmac0 0xd1>, <&dmac0 0xd2>;
+ dma-names = "tx", "rx";
reg-io-width = <4>;
status = "disabled";
};
--
1.8.5.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 10/11] ARM: shmobile: r8a7790: Reference DMA channels in SDHI DT nodes
2014-07-15 22:45 [PATCH 00/11] MMCIF and SDHI DMA support in DT for R-Car H2 and M2 Laurent Pinchart
` (8 preceding siblings ...)
2014-07-15 22:45 ` [PATCH 09/11] ARM: shmobile: r8a7791: Reference DMA channels in MMCIF DT node Laurent Pinchart
@ 2014-07-15 22:45 ` Laurent Pinchart
2014-08-04 9:01 ` Geert Uytterhoeven
2014-07-15 22:45 ` [PATCH 11/11] ARM: shmobile: r8a7791: " Laurent Pinchart
10 siblings, 1 reply; 23+ messages in thread
From: Laurent Pinchart @ 2014-07-15 22:45 UTC (permalink / raw)
To: linux-sh; +Cc: linux-mmc, Guennadi Liakhovetski, Ian Molton
Add references to the transmit and receive DMA channels in the four
SDHI nodes.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/boot/dts/r8a7790.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 465008a..2ea3b2a 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -388,6 +388,8 @@
reg = <0 0xee100000 0 0x200>;
interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7790_CLK_SDHI0>;
+ dmas = <&dmac0 0xcd>, <&dmac0 0xce>;
+ dma-names = "tx", "rx";
cap-sd-highspeed;
status = "disabled";
};
@@ -397,6 +399,8 @@
reg = <0 0xee120000 0 0x200>;
interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7790_CLK_SDHI1>;
+ dmas = <&dmac0 0xc9>, <&dmac0 0xca>;
+ dma-names = "tx", "rx";
cap-sd-highspeed;
status = "disabled";
};
@@ -406,6 +410,8 @@
reg = <0 0xee140000 0 0x100>;
interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7790_CLK_SDHI2>;
+ dmas = <&dmac0 0xc1>, <&dmac0 0xc2>;
+ dma-names = "tx", "rx";
cap-sd-highspeed;
status = "disabled";
};
@@ -415,6 +421,8 @@
reg = <0 0xee160000 0 0x100>;
interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7790_CLK_SDHI3>;
+ dmas = <&dmac0 0xd3>, <&dmac0 0xd4>;
+ dma-names = "tx", "rx";
cap-sd-highspeed;
status = "disabled";
};
--
1.8.5.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 11/11] ARM: shmobile: r8a7791: Reference DMA channels in SDHI DT nodes
2014-07-15 22:45 [PATCH 00/11] MMCIF and SDHI DMA support in DT for R-Car H2 and M2 Laurent Pinchart
` (9 preceding siblings ...)
2014-07-15 22:45 ` [PATCH 10/11] ARM: shmobile: r8a7790: Reference DMA channels in SDHI DT nodes Laurent Pinchart
@ 2014-07-15 22:45 ` Laurent Pinchart
2014-08-04 9:01 ` Geert Uytterhoeven
10 siblings, 1 reply; 23+ messages in thread
From: Laurent Pinchart @ 2014-07-15 22:45 UTC (permalink / raw)
To: linux-sh; +Cc: linux-mmc, Guennadi Liakhovetski, Ian Molton
Add references to the transmit and receive DMA channels in the three
SDHI nodes.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/boot/dts/r8a7791.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index ff0d415..88be0cc 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -381,6 +381,8 @@
reg = <0 0xee100000 0 0x200>;
interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7791_CLK_SDHI0>;
+ dmas = <&dmac0 0xcd>, <&dmac0 0xce>;
+ dma-names = "tx", "rx";
status = "disabled";
};
@@ -389,6 +391,8 @@
reg = <0 0xee140000 0 0x100>;
interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7791_CLK_SDHI1>;
+ dmas = <&dmac0 0xc1>, <&dmac0 0xc2>;
+ dma-names = "tx", "rx";
status = "disabled";
};
@@ -397,6 +401,8 @@
reg = <0 0xee160000 0 0x100>;
interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7791_CLK_SDHI2>;
+ dmas = <&dmac0 0xd3>, <&dmac0 0xd4>;
+ dma-names = "tx", "rx";
status = "disabled";
};
--
1.8.5.5
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PATCH 05/11] mmc: tmio: Fix DMA source address
2014-07-15 22:45 ` [PATCH 05/11] mmc: tmio: Fix DMA source address Laurent Pinchart
@ 2014-07-16 1:39 ` Kuninori Morimoto
2014-07-16 9:41 ` Laurent Pinchart
0 siblings, 1 reply; 23+ messages in thread
From: Kuninori Morimoto @ 2014-07-16 1:39 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linux-sh, linux-mmc, Guennadi Liakhovetski, Ian Molton
Hi Laurent
> DMA reads from the data buffer register must be offset by 0x2000
> according to the hardware documentation.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> drivers/mmc/host/tmio_mmc_dma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c
> index eb8f1d5..4da7be1 100644
> --- a/drivers/mmc/host/tmio_mmc_dma.c
> +++ b/drivers/mmc/host/tmio_mmc_dma.c
> @@ -312,7 +312,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
> if (pdata->dma->chan_priv_rx)
> cfg.slave_id = pdata->dma->slave_id_rx;
> cfg.direction = DMA_DEV_TO_MEM;
> - cfg.src_addr = cfg.dst_addr;
> + cfg.src_addr = cfg.dst_addr + 0x2000;
> cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
> cfg.dst_addr = 0;
> ret = dmaengine_slave_config(host->chan_rx, &cfg);
Unfortunately, this patch breaks compatibility.
This "+ 0x2000" is required only from Renesas R-Car.
I alreay sent this fixup patch before (not accepted yet, and I will re-send v2 patch soon)
https://www.mail-archive.com/linux-mmc@vger.kernel.org/msg26776.html
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 05/11] mmc: tmio: Fix DMA source address
2014-07-16 1:39 ` Kuninori Morimoto
@ 2014-07-16 9:41 ` Laurent Pinchart
2014-07-17 1:00 ` Kuninori Morimoto
0 siblings, 1 reply; 23+ messages in thread
From: Laurent Pinchart @ 2014-07-16 9:41 UTC (permalink / raw)
To: Kuninori Morimoto
Cc: Laurent Pinchart, linux-sh, linux-mmc, Guennadi Liakhovetski,
Ian Molton
Hi Morimoto-san,
Thank you for the review.
On Tuesday 15 July 2014 18:39:04 Kuninori Morimoto wrote:
> Hi Laurent
>
> > DMA reads from the data buffer register must be offset by 0x2000
> > according to the hardware documentation.
> >
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> >
> > drivers/mmc/host/tmio_mmc_dma.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/tmio_mmc_dma.c
> > b/drivers/mmc/host/tmio_mmc_dma.c index eb8f1d5..4da7be1 100644
> > --- a/drivers/mmc/host/tmio_mmc_dma.c
> > +++ b/drivers/mmc/host/tmio_mmc_dma.c
> > @@ -312,7 +312,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host,
> > struct tmio_mmc_data *pdat>
> > if (pdata->dma->chan_priv_rx)
> >
> > cfg.slave_id = pdata->dma->slave_id_rx;
> >
> > cfg.direction = DMA_DEV_TO_MEM;
> >
> > - cfg.src_addr = cfg.dst_addr;
> > + cfg.src_addr = cfg.dst_addr + 0x2000;
> >
> > cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
> > cfg.dst_addr = 0;
> > ret = dmaengine_slave_config(host->chan_rx, &cfg);
>
> Unfortunately, this patch breaks compatibility.
> This "+ 0x2000" is required only from Renesas R-Car.
> I alreay sent this fixup patch before (not accepted yet, and I will re-send
> v2 patch soon)
>
> https://www.mail-archive.com/linux-mmc@vger.kernel.org/msg26776.html
I've applied your patch locally, thank you. You can add my Acked-by line to
v2. When do you plan to push it to mainline ?
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 05/11] mmc: tmio: Fix DMA source address
2014-07-16 9:41 ` Laurent Pinchart
@ 2014-07-17 1:00 ` Kuninori Morimoto
0 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2014-07-17 1:00 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Laurent Pinchart, linux-sh, linux-mmc, Guennadi Liakhovetski,
Ian Molton
Hi Laurent
> > Unfortunately, this patch breaks compatibility.
> > This "+ 0x2000" is required only from Renesas R-Car.
> > I alreay sent this fixup patch before (not accepted yet, and I will re-send
> > v2 patch soon)
> >
> > https://www.mail-archive.com/linux-mmc@vger.kernel.org/msg26776.html
>
> I've applied your patch locally, thank you. You can add my Acked-by line to
> v2. When do you plan to push it to mainline ?
Thank you.
I think v2 will be posted in next week.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 01/11] mmc: sh_mmcif: Document DT bindings
2014-07-15 22:45 ` [PATCH 01/11] mmc: sh_mmcif: Document DT bindings Laurent Pinchart
@ 2014-07-26 9:39 ` Ulf Hansson
0 siblings, 0 replies; 23+ messages in thread
From: Ulf Hansson @ 2014-07-26 9:39 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Linux-sh list, linux-mmc, Guennadi Liakhovetski, Ian Molton,
devicetree@vger.kernel.org
On 16 July 2014 00:45, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> The sh-mmcif driver implements DT support but the bindings are not
> documented. Document them.
>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thanks! Applied for next.
Kind regards
Uffe
> ---
> .../devicetree/bindings/mmc/renesas,mmcif.txt | 32 ++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
>
> diff --git a/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
> new file mode 100644
> index 0000000..299081f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
> @@ -0,0 +1,32 @@
> +* Renesas Multi Media Card Interface (MMCIF) Controller
> +
> +This file documents differences between the core properties in mmc.txt
> +and the properties used by the MMCIF device.
> +
> +
> +Required properties:
> +
> +- compatible: must contain one of the following
> + - "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs
> + - "renesas,mmcif-r8a7790" for the MMCIF found in r8a7790 SoCs
> + - "renesas,mmcif-r8a7791" for the MMCIF found in r8a7791 SoCs
> + - "renesas,sh-mmcif" for the generic MMCIF
> +
> +- clocks: reference to the functional clock
> +
> +- dmas: reference to the DMA channels, one per channel name listed in the
> + dma-names property.
> +- dma-names: must contain "tx" for the transmit DMA channel and "rx" for the
> + receive DMA channel.
> +
> +
> +Example: R8A7790 (R-Car H2) MMCIF0
> +
> + mmcif0: mmc@ee200000 {
> + compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif";
> + reg = <0 0xee200000 0 0x80>;
> + interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&mstp3_clks R8A7790_CLK_MMCIF0>;
> + dmas = <&dmac0 0xd1>, <&dmac0 0xd2>;
> + dma-names = "tx", "rx";
> + };
> --
> 1.8.5.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 02/11] mmc: sh_mmcif: Fix DMA slave address configuration
2014-07-15 22:45 ` [PATCH 02/11] mmc: sh_mmcif: Fix DMA slave address configuration Laurent Pinchart
@ 2014-07-26 9:40 ` Ulf Hansson
0 siblings, 0 replies; 23+ messages in thread
From: Ulf Hansson @ 2014-07-26 9:40 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Linux-sh list, linux-mmc, Guennadi Liakhovetski, Ian Molton
On 16 July 2014 00:45, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> Commit e5a233cb647d749de2f188477c9a54b94d90477f ("mmc: sh_mmcif:
> Factorize DMA channel request and configuration code") incorrectly
> set the destination address for both slave channels instead of setting
> the source address for the receive channel. Fix that.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thanks! Applied for next.
Kind regards
Uffe
> ---
> drivers/mmc/host/sh_mmcif.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
> index 656fbba..436d663 100644
> --- a/drivers/mmc/host/sh_mmcif.c
> +++ b/drivers/mmc/host/sh_mmcif.c
> @@ -386,7 +386,7 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
> struct sh_mmcif_plat_data *pdata,
> enum dma_transfer_direction direction)
> {
> - struct dma_slave_config cfg;
> + struct dma_slave_config cfg = { 0, };
> struct dma_chan *chan;
> unsigned int slave_id;
> struct resource *res;
> @@ -417,8 +417,12 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
> /* In the OF case the driver will get the slave ID from the DT */
> cfg.slave_id = slave_id;
> cfg.direction = direction;
> - cfg.dst_addr = res->start + MMCIF_CE_DATA;
> - cfg.src_addr = 0;
> +
> + if (direction = DMA_DEV_TO_MEM)
> + cfg.src_addr = res->start + MMCIF_CE_DATA;
> + else
> + cfg.dst_addr = res->start + MMCIF_CE_DATA;
> +
> ret = dmaengine_slave_config(chan, &cfg);
> if (ret < 0) {
> dma_release_channel(chan);
> --
> 1.8.5.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 03/11] mmc: sh_mmcif: Configure DMA slave bus width
2014-07-15 22:45 ` [PATCH 03/11] mmc: sh_mmcif: Configure DMA slave bus width Laurent Pinchart
@ 2014-07-26 9:40 ` Ulf Hansson
0 siblings, 0 replies; 23+ messages in thread
From: Ulf Hansson @ 2014-07-26 9:40 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Linux-sh list, linux-mmc, Guennadi Liakhovetski, Ian Molton
On 16 July 2014 00:45, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> The data register is 4 bytes wide, hardcode the DMA transfer size to
> 4 bytes in both directions.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thanks! Applied for next.
Kind regards
Uffe
> ---
> drivers/mmc/host/sh_mmcif.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
> index 436d663..cc8ae09 100644
> --- a/drivers/mmc/host/sh_mmcif.c
> +++ b/drivers/mmc/host/sh_mmcif.c
> @@ -418,10 +418,13 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
> cfg.slave_id = slave_id;
> cfg.direction = direction;
>
> - if (direction = DMA_DEV_TO_MEM)
> + if (direction = DMA_DEV_TO_MEM) {
> cfg.src_addr = res->start + MMCIF_CE_DATA;
> - else
> + cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
> + } else {
> cfg.dst_addr = res->start + MMCIF_CE_DATA;
> + cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
> + }
>
> ret = dmaengine_slave_config(chan, &cfg);
> if (ret < 0) {
> --
> 1.8.5.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 04/11] mmc: tmio: Configure DMA slave bus width
2014-07-15 22:45 ` [PATCH 04/11] mmc: tmio: " Laurent Pinchart
@ 2014-07-26 9:41 ` Ulf Hansson
0 siblings, 0 replies; 23+ messages in thread
From: Ulf Hansson @ 2014-07-26 9:41 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Linux-sh list, linux-mmc, Guennadi Liakhovetski, Ian Molton
On 16 July 2014 00:45, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> Even though some implementations support 4-bytes data register access,
> the tmio driver never configures the hardware in such a way and always
> performs 2-bytes accesses. Hardcode the DMA transfer size to 2 bytes.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thanks! Applied for next.
Kind regards
Uffe
> ---
> drivers/mmc/host/tmio_mmc_dma.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c
> index 03e7b28..eb8f1d5 100644
> --- a/drivers/mmc/host/tmio_mmc_dma.c
> +++ b/drivers/mmc/host/tmio_mmc_dma.c
> @@ -294,6 +294,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
> cfg.slave_id = pdata->dma->slave_id_tx;
> cfg.direction = DMA_MEM_TO_DEV;
> cfg.dst_addr = res->start + (CTL_SD_DATA_PORT << host->pdata->bus_shift);
> + cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
> cfg.src_addr = 0;
> ret = dmaengine_slave_config(host->chan_tx, &cfg);
> if (ret < 0)
> @@ -312,6 +313,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
> cfg.slave_id = pdata->dma->slave_id_rx;
> cfg.direction = DMA_DEV_TO_MEM;
> cfg.src_addr = cfg.dst_addr;
> + cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
> cfg.dst_addr = 0;
> ret = dmaengine_slave_config(host->chan_rx, &cfg);
> if (ret < 0)
> --
> 1.8.5.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 09/11] ARM: shmobile: r8a7791: Reference DMA channels in MMCIF DT node
2014-07-15 22:45 ` [PATCH 09/11] ARM: shmobile: r8a7791: Reference DMA channels in MMCIF DT node Laurent Pinchart
@ 2014-08-04 8:49 ` Geert Uytterhoeven
0 siblings, 0 replies; 23+ messages in thread
From: Geert Uytterhoeven @ 2014-08-04 8:49 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Linux-sh list, Linux MMC List, Guennadi Liakhovetski, Ian Molton
On Wed, Jul 16, 2014 at 12:45 AM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> Add references to the transmit and receive DMA channels in the MMCIF
> node.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
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
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 10/11] ARM: shmobile: r8a7790: Reference DMA channels in SDHI DT nodes
2014-07-15 22:45 ` [PATCH 10/11] ARM: shmobile: r8a7790: Reference DMA channels in SDHI DT nodes Laurent Pinchart
@ 2014-08-04 9:01 ` Geert Uytterhoeven
2014-08-04 14:03 ` Laurent Pinchart
0 siblings, 1 reply; 23+ messages in thread
From: Geert Uytterhoeven @ 2014-08-04 9:01 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Linux-sh list, Linux MMC List, Guennadi Liakhovetski, Ian Molton
On Wed, Jul 16, 2014 at 12:45 AM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> Add references to the transmit and receive DMA channels in the four
> SDHI nodes.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
but see below for a question (this also applies to other members of the R-Car
Gen 2 family)...
> ---
> arch/arm/boot/dts/r8a7790.dtsi | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
> index 465008a..2ea3b2a 100644
> --- a/arch/arm/boot/dts/r8a7790.dtsi
> +++ b/arch/arm/boot/dts/r8a7790.dtsi
> @@ -406,6 +410,8 @@
> reg = <0 0xee140000 0 0x100>;
> interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&mstp3_clks R8A7790_CLK_SDHI2>;
> + dmas = <&dmac0 0xc1>, <&dmac0 0xc2>;
> + dma-names = "tx", "rx";
> cap-sd-highspeed;
> status = "disabled";
> };
> @@ -415,6 +421,8 @@
> reg = <0 0xee160000 0 0x100>;
> interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&mstp3_clks R8A7790_CLK_SDHI3>;
> + dmas = <&dmac0 0xd3>, <&dmac0 0xd4>;
> + dma-names = "tx", "rx";
> cap-sd-highspeed;
> status = "disabled";
> };
SDHI2 and SDHI3 actually have 2 sets of 2 (TX and RX) DMA channels:
the normal one, and the "C2" one. However, I didn't get any wiser about this
"C2" by browsing through the docs.
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
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 11/11] ARM: shmobile: r8a7791: Reference DMA channels in SDHI DT nodes
2014-07-15 22:45 ` [PATCH 11/11] ARM: shmobile: r8a7791: " Laurent Pinchart
@ 2014-08-04 9:01 ` Geert Uytterhoeven
0 siblings, 0 replies; 23+ messages in thread
From: Geert Uytterhoeven @ 2014-08-04 9:01 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Linux-sh list, Linux MMC List, Guennadi Liakhovetski, Ian Molton
On Wed, Jul 16, 2014 at 12:45 AM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> Add references to the transmit and receive DMA channels in the three
> SDHI nodes.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
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
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 10/11] ARM: shmobile: r8a7790: Reference DMA channels in SDHI DT nodes
2014-08-04 9:01 ` Geert Uytterhoeven
@ 2014-08-04 14:03 ` Laurent Pinchart
0 siblings, 0 replies; 23+ messages in thread
From: Laurent Pinchart @ 2014-08-04 14:03 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Laurent Pinchart, Linux-sh list, Linux MMC List,
Guennadi Liakhovetski, Ian Molton
Hi Geert,
On Monday 04 August 2014 11:01:28 Geert Uytterhoeven wrote:
> On Wed, Jul 16, 2014 at 12:45 AM, Laurent Pinchart wrote:
> > Add references to the transmit and receive DMA channels in the four
> > SDHI nodes.
> >
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
>
> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> but see below for a question (this also applies to other members of the
> R-Car Gen 2 family)...
>
> > ---
> >
> > arch/arm/boot/dts/r8a7790.dtsi | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/r8a7790.dtsi
> > b/arch/arm/boot/dts/r8a7790.dtsi index 465008a..2ea3b2a 100644
> > --- a/arch/arm/boot/dts/r8a7790.dtsi
> > +++ b/arch/arm/boot/dts/r8a7790.dtsi
> > @@ -406,6 +410,8 @@
> > reg = <0 0xee140000 0 0x100>;
> > interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
> > clocks = <&mstp3_clks R8A7790_CLK_SDHI2>;
> > + dmas = <&dmac0 0xc1>, <&dmac0 0xc2>;
> > + dma-names = "tx", "rx";
> > cap-sd-highspeed;
> > status = "disabled";
> > };
> > @@ -415,6 +421,8 @@
> > reg = <0 0xee160000 0 0x100>;
> > interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
> > clocks = <&mstp3_clks R8A7790_CLK_SDHI3>;
> > + dmas = <&dmac0 0xd3>, <&dmac0 0xd4>;
> > + dma-names = "tx", "rx";
> > cap-sd-highspeed;
> > status = "disabled";
> > };
>
> SDHI2 and SDHI3 actually have 2 sets of 2 (TX and RX) DMA channels:
> the normal one, and the "C2" one. However, I didn't get any wiser about this
> "C2" by browsing through the docs.
I didn't either, so I've decided to ignore them for now. It's funny sometimes
how life gets simpler when you selectively ignore information ;-)
More seriously, if anyone has any information regarding what the "C2" channels
are, that would be appreciated.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2014-08-04 14:03 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15 22:45 [PATCH 00/11] MMCIF and SDHI DMA support in DT for R-Car H2 and M2 Laurent Pinchart
2014-07-15 22:45 ` [PATCH 01/11] mmc: sh_mmcif: Document DT bindings Laurent Pinchart
2014-07-26 9:39 ` Ulf Hansson
2014-07-15 22:45 ` [PATCH 02/11] mmc: sh_mmcif: Fix DMA slave address configuration Laurent Pinchart
2014-07-26 9:40 ` Ulf Hansson
2014-07-15 22:45 ` [PATCH 03/11] mmc: sh_mmcif: Configure DMA slave bus width Laurent Pinchart
2014-07-26 9:40 ` Ulf Hansson
2014-07-15 22:45 ` [PATCH 04/11] mmc: tmio: " Laurent Pinchart
2014-07-26 9:41 ` Ulf Hansson
2014-07-15 22:45 ` [PATCH 05/11] mmc: tmio: Fix DMA source address Laurent Pinchart
2014-07-16 1:39 ` Kuninori Morimoto
2014-07-16 9:41 ` Laurent Pinchart
2014-07-17 1:00 ` Kuninori Morimoto
2014-07-15 22:45 ` [PATCH 06/11] ARM: shmobile: r8a7790: Rename mmcif node to mmc Laurent Pinchart
2014-07-15 22:45 ` [PATCH 07/11] ARM: shmobile: r8a7791: Add MMCIF0 DT node Laurent Pinchart
2014-07-15 22:45 ` [PATCH 08/11] ARM: shmobile: r8a7790: Reference DMA channels in MMCIF DT nodes Laurent Pinchart
2014-07-15 22:45 ` [PATCH 09/11] ARM: shmobile: r8a7791: Reference DMA channels in MMCIF DT node Laurent Pinchart
2014-08-04 8:49 ` Geert Uytterhoeven
2014-07-15 22:45 ` [PATCH 10/11] ARM: shmobile: r8a7790: Reference DMA channels in SDHI DT nodes Laurent Pinchart
2014-08-04 9:01 ` Geert Uytterhoeven
2014-08-04 14:03 ` Laurent Pinchart
2014-07-15 22:45 ` [PATCH 11/11] ARM: shmobile: r8a7791: " Laurent Pinchart
2014-08-04 9:01 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).