* [PATCH 2/9 v4] mmc: sh_mmcif: remove slave_id settings for DMAEngine
@ 2015-01-22 3:47 Kuninori Morimoto
2015-01-22 8:42 ` Ulf Hansson
2015-01-29 1:01 ` Kuninori Morimoto
0 siblings, 2 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2015-01-22 3:47 UTC (permalink / raw)
To: linux-sh
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Current sh_mmcif sets dma_slave_config :: slave_id field for DMAEngine,
but it is no longer needed. Let's remove it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
v3 -> v4
- set default slave_data = NULL, and removed "else" case
drivers/mmc/host/sh_mmcif.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 7d9d6a3..26b7889 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -388,7 +388,7 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
{
struct dma_slave_config cfg = { 0, };
struct dma_chan *chan;
- unsigned int slave_id;
+ void *slave_data = NULL;
struct resource *res;
dma_cap_mask_t mask;
int ret;
@@ -397,13 +397,12 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
dma_cap_set(DMA_SLAVE, mask);
if (pdata)
- slave_id = direction = DMA_MEM_TO_DEV
- ? pdata->slave_id_tx : pdata->slave_id_rx;
- else
- slave_id = 0;
+ slave_data = direction = DMA_MEM_TO_DEV ?
+ (void *)pdata->slave_id_tx :
+ (void *)pdata->slave_id_rx;
chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
- (void *)(unsigned long)slave_id, &host->pd->dev,
+ slave_data, &host->pd->dev,
direction = DMA_MEM_TO_DEV ? "tx" : "rx");
dev_dbg(&host->pd->dev, "%s: %s: got channel %p\n", __func__,
@@ -414,8 +413,6 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
res = platform_get_resource(host->pd, IORESOURCE_MEM, 0);
- /* In the OF case the driver will get the slave ID from the DT */
- cfg.slave_id = slave_id;
cfg.direction = direction;
if (direction = DMA_DEV_TO_MEM) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/9 v4] mmc: sh_mmcif: remove slave_id settings for DMAEngine
2015-01-22 3:47 [PATCH 2/9 v4] mmc: sh_mmcif: remove slave_id settings for DMAEngine Kuninori Morimoto
@ 2015-01-22 8:42 ` Ulf Hansson
2015-01-29 1:01 ` Kuninori Morimoto
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2015-01-22 8:42 UTC (permalink / raw)
To: linux-sh
On 22 January 2015 at 04:47, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Current sh_mmcif sets dma_slave_config :: slave_id field for DMAEngine,
> but it is no longer needed. Let's remove it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Kind regards
Uffe
> ---
> v3 -> v4
>
> - set default slave_data = NULL, and removed "else" case
>
> drivers/mmc/host/sh_mmcif.c | 13 +++++--------
> 1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
> index 7d9d6a3..26b7889 100644
> --- a/drivers/mmc/host/sh_mmcif.c
> +++ b/drivers/mmc/host/sh_mmcif.c
> @@ -388,7 +388,7 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
> {
> struct dma_slave_config cfg = { 0, };
> struct dma_chan *chan;
> - unsigned int slave_id;
> + void *slave_data = NULL;
> struct resource *res;
> dma_cap_mask_t mask;
> int ret;
> @@ -397,13 +397,12 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
> dma_cap_set(DMA_SLAVE, mask);
>
> if (pdata)
> - slave_id = direction = DMA_MEM_TO_DEV
> - ? pdata->slave_id_tx : pdata->slave_id_rx;
> - else
> - slave_id = 0;
> + slave_data = direction = DMA_MEM_TO_DEV ?
> + (void *)pdata->slave_id_tx :
> + (void *)pdata->slave_id_rx;
>
> chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
> - (void *)(unsigned long)slave_id, &host->pd->dev,
> + slave_data, &host->pd->dev,
> direction = DMA_MEM_TO_DEV ? "tx" : "rx");
>
> dev_dbg(&host->pd->dev, "%s: %s: got channel %p\n", __func__,
> @@ -414,8 +413,6 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
>
> res = platform_get_resource(host->pd, IORESOURCE_MEM, 0);
>
> - /* In the OF case the driver will get the slave ID from the DT */
> - cfg.slave_id = slave_id;
> cfg.direction = direction;
>
> if (direction = DMA_DEV_TO_MEM) {
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/9 v4] mmc: sh_mmcif: remove slave_id settings for DMAEngine
2015-01-22 3:47 [PATCH 2/9 v4] mmc: sh_mmcif: remove slave_id settings for DMAEngine Kuninori Morimoto
2015-01-22 8:42 ` Ulf Hansson
@ 2015-01-29 1:01 ` Kuninori Morimoto
1 sibling, 0 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2015-01-29 1:01 UTC (permalink / raw)
To: linux-sh
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Current sh_mmcif sets dma_slave_config :: slave_id field for DMAEngine,
but it is no longer needed. Let's remove it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
---
v3 -> v4
- add Ulf's Acked-by
drivers/mmc/host/sh_mmcif.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 7d9d6a3..26b7889 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -388,7 +388,7 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
{
struct dma_slave_config cfg = { 0, };
struct dma_chan *chan;
- unsigned int slave_id;
+ void *slave_data = NULL;
struct resource *res;
dma_cap_mask_t mask;
int ret;
@@ -397,13 +397,12 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
dma_cap_set(DMA_SLAVE, mask);
if (pdata)
- slave_id = direction = DMA_MEM_TO_DEV
- ? pdata->slave_id_tx : pdata->slave_id_rx;
- else
- slave_id = 0;
+ slave_data = direction = DMA_MEM_TO_DEV ?
+ (void *)pdata->slave_id_tx :
+ (void *)pdata->slave_id_rx;
chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
- (void *)(unsigned long)slave_id, &host->pd->dev,
+ slave_data, &host->pd->dev,
direction = DMA_MEM_TO_DEV ? "tx" : "rx");
dev_dbg(&host->pd->dev, "%s: %s: got channel %p\n", __func__,
@@ -414,8 +413,6 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
res = platform_get_resource(host->pd, IORESOURCE_MEM, 0);
- /* In the OF case the driver will get the slave ID from the DT */
- cfg.slave_id = slave_id;
cfg.direction = direction;
if (direction = DMA_DEV_TO_MEM) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-29 1:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-22 3:47 [PATCH 2/9 v4] mmc: sh_mmcif: remove slave_id settings for DMAEngine Kuninori Morimoto
2015-01-22 8:42 ` Ulf Hansson
2015-01-29 1:01 ` Kuninori Morimoto
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.