2013-03-06 14:11:43

by Matt Porter

[permalink] [raw]
Subject: [PATCH v3 0/2] omap_hsmmc DT DMA Client support

Changes since v2:
- dropped skip platform_get_resource_byname() patch
Changes since v1:
- rebase to 3.9-rc1, previous dependencies upstream

This series adds DT DMA Engine Client support to the omap_hsmmc.
It leverages the generic DMA OF helpers and the
dma_request_slave_channel_compat() wrapper to support DMA in
omap_hsmmc on platforms booting via DT. These platforms include
omap2/3/4/5 and am33xx.

These patches were split out from the v5 version of the AM33XX DMA
series and split from the EDMA-specific omap_hsmmc changes.

Matt Porter (2):
mmc: omap_hsmmc: convert to dma_request_slave_channel_compat()
mmc: omap_hsmmc: add generic DMA request support to the DT binding

.../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 26 +++++++++++++++++++-
drivers/mmc/host/omap_hsmmc.c | 10 ++++++--
2 files changed, 33 insertions(+), 3 deletions(-)

--
1.7.9.5


2013-03-06 14:11:49

by Matt Porter

[permalink] [raw]
Subject: [PATCH v3 1/2] mmc: omap_hsmmc: convert to dma_request_slave_channel_compat()

Convert dmaengine channel requests to use
dma_request_slave_channel_compat(). This supports platforms booting
with or without DT populated.

Signed-off-by: Matt Porter <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
---
drivers/mmc/host/omap_hsmmc.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index bc58078..e79b12d 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1915,14 +1915,20 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);

- host->rx_chan = dma_request_channel(mask, omap_dma_filter_fn, &rx_req);
+ host->rx_chan =
+ dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
+ &rx_req, &pdev->dev, "rx");
+
if (!host->rx_chan) {
dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req);
ret = -ENXIO;
goto err_irq;
}

- host->tx_chan = dma_request_channel(mask, omap_dma_filter_fn, &tx_req);
+ host->tx_chan =
+ dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
+ &tx_req, &pdev->dev, "tx");
+
if (!host->tx_chan) {
dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel %u\n", tx_req);
ret = -ENXIO;
--
1.7.9.5

2013-03-06 14:12:06

by Matt Porter

[permalink] [raw]
Subject: [PATCH v3 2/2] mmc: omap_hsmmc: add generic DMA request support to the DT binding

The binding definition is based on the generic DMA request binding.

Signed-off-by: Matt Porter <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
---
.../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 26 +++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
index ed271fc..8c8908a 100644
--- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
+++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
@@ -20,8 +20,29 @@ ti,dual-volt: boolean, supports dual voltage cards
ti,non-removable: non-removable slot (like eMMC)
ti,needs-special-reset: Requires a special softreset sequence
ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed
+dmas: List of DMA specifiers with the controller specific format
+as described in the generic DMA client binding. A tx and rx
+specifier is required.
+dma-names: List of DMA request names. These strings correspond
+1:1 with the DMA specifiers listed in dmas. The string naming is
+to be "rx" and "tx" for RX and TX DMA requests, respectively.
+
+Examples:
+
+[hwmod populated DMA resources]
+
+ mmc1: mmc@0x4809c000 {
+ compatible = "ti,omap4-hsmmc";
+ reg = <0x4809c000 0x400>;
+ ti,hwmods = "mmc1";
+ ti,dual-volt;
+ bus-width = <4>;
+ vmmc-supply = <&vmmc>; /* phandle to regulator node */
+ ti,non-removable;
+ };
+
+[generic DMA request binding]

-Example:
mmc1: mmc@0x4809c000 {
compatible = "ti,omap4-hsmmc";
reg = <0x4809c000 0x400>;
@@ -30,4 +51,7 @@ Example:
bus-width = <4>;
vmmc-supply = <&vmmc>; /* phandle to regulator node */
ti,non-removable;
+ dmas = <&edma 24
+ &edma 25>;
+ dma-names = "tx", "rx";
};
--
1.7.9.5

2013-04-05 12:59:08

by Balaji T K

[permalink] [raw]
Subject: Re: [PATCH v3 0/2] omap_hsmmc DT DMA Client support

On Wednesday 06 March 2013 07:42 PM, Matt Porter wrote:
> Changes since v2:
> - dropped skip platform_get_resource_byname() patch
> Changes since v1:
> - rebase to 3.9-rc1, previous dependencies upstream
>
> This series adds DT DMA Engine Client support to the omap_hsmmc.
> It leverages the generic DMA OF helpers and the
> dma_request_slave_channel_compat() wrapper to support DMA in
> omap_hsmmc on platforms booting via DT. These platforms include
> omap2/3/4/5 and am33xx.
>
> These patches were split out from the v5 version of the AM33XX DMA
> series and split from the EDMA-specific omap_hsmmc changes.
>
> Matt Porter (2):
> mmc: omap_hsmmc: convert to dma_request_slave_channel_compat()
> mmc: omap_hsmmc: add generic DMA request support to the DT binding
>

Looks good to me
Acked-by: Balaji T K <[email protected]>

> .../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 26 +++++++++++++++++++-
> drivers/mmc/host/omap_hsmmc.c | 10 ++++++--
> 2 files changed, 33 insertions(+), 3 deletions(-)
>