diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-05-09 11:09:15 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-07-12 23:43:07 -0400 |
commit | 916001fe33b7b4dc797f7b29ec8bc346c4369fa6 (patch) | |
tree | e62f4ff5e51704bab0c365ab555afd23b2be076f | |
parent | 5902c9a7a2a9c2520af54af1ba7a9c7831664a17 (diff) |
mmc: sh_mmcif: remove unneeded struct sh_mmcif_dma, prepare to shdma conversion
Now that all users have been updated to use the embedded in struct
sh_mmcif_plat_data DMA slave IDs, struct sh_mmcif_dma is no longer needed
and can be removed. This also makes preparation to the shdma base library
conversion easier.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Chris Ball <cjb@laptop.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
-rw-r--r-- | drivers/mmc/host/sh_mmcif.c | 24 | ||||
-rw-r--r-- | include/linux/mmc/sh_mmcif.h | 8 |
2 files changed, 11 insertions, 21 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 724b35e85a26..9e3b9b1c3637 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c | |||
@@ -385,31 +385,27 @@ static void sh_mmcif_request_dma(struct sh_mmcif_host *host, | |||
385 | host->dma_active = false; | 385 | host->dma_active = false; |
386 | 386 | ||
387 | /* We can only either use DMA for both Tx and Rx or not use it at all */ | 387 | /* We can only either use DMA for both Tx and Rx or not use it at all */ |
388 | if (pdata->dma) { | 388 | tx = &host->dma_slave_tx; |
389 | dev_warn(&host->pd->dev, | 389 | tx->shdma_slave.slave_id = pdata->slave_id_tx; |
390 | "Update your platform to use embedded DMA slave IDs\n"); | 390 | rx = &host->dma_slave_rx; |
391 | tx = &pdata->dma->chan_priv_tx; | 391 | rx->shdma_slave.slave_id = pdata->slave_id_rx; |
392 | rx = &pdata->dma->chan_priv_rx; | 392 | |
393 | } else { | 393 | if (tx->shdma_slave.slave_id > 0 && rx->shdma_slave.slave_id > 0) { |
394 | tx = &host->dma_slave_tx; | ||
395 | tx->slave_id = pdata->slave_id_tx; | ||
396 | rx = &host->dma_slave_rx; | ||
397 | rx->slave_id = pdata->slave_id_rx; | ||
398 | } | ||
399 | if (tx->slave_id > 0 && rx->slave_id > 0) { | ||
400 | dma_cap_mask_t mask; | 394 | dma_cap_mask_t mask; |
401 | 395 | ||
402 | dma_cap_zero(mask); | 396 | dma_cap_zero(mask); |
403 | dma_cap_set(DMA_SLAVE, mask); | 397 | dma_cap_set(DMA_SLAVE, mask); |
404 | 398 | ||
405 | host->chan_tx = dma_request_channel(mask, sh_mmcif_filter, tx); | 399 | host->chan_tx = dma_request_channel(mask, sh_mmcif_filter, |
400 | &tx->shdma_slave); | ||
406 | dev_dbg(&host->pd->dev, "%s: TX: got channel %p\n", __func__, | 401 | dev_dbg(&host->pd->dev, "%s: TX: got channel %p\n", __func__, |
407 | host->chan_tx); | 402 | host->chan_tx); |
408 | 403 | ||
409 | if (!host->chan_tx) | 404 | if (!host->chan_tx) |
410 | return; | 405 | return; |
411 | 406 | ||
412 | host->chan_rx = dma_request_channel(mask, sh_mmcif_filter, rx); | 407 | host->chan_rx = dma_request_channel(mask, sh_mmcif_filter, |
408 | &rx->shdma_slave); | ||
413 | dev_dbg(&host->pd->dev, "%s: RX: got channel %p\n", __func__, | 409 | dev_dbg(&host->pd->dev, "%s: RX: got channel %p\n", __func__, |
414 | host->chan_rx); | 410 | host->chan_rx); |
415 | 411 | ||
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index 05f0e3db1c12..c37956ccf02e 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h | |||
@@ -32,17 +32,11 @@ | |||
32 | * 1111 : Peripheral clock (sup_pclk set '1') | 32 | * 1111 : Peripheral clock (sup_pclk set '1') |
33 | */ | 33 | */ |
34 | 34 | ||
35 | struct sh_mmcif_dma { | ||
36 | struct sh_dmae_slave chan_priv_tx; | ||
37 | struct sh_dmae_slave chan_priv_rx; | ||
38 | }; | ||
39 | |||
40 | struct sh_mmcif_plat_data { | 35 | struct sh_mmcif_plat_data { |
41 | void (*set_pwr)(struct platform_device *pdev, int state); | 36 | void (*set_pwr)(struct platform_device *pdev, int state); |
42 | void (*down_pwr)(struct platform_device *pdev); | 37 | void (*down_pwr)(struct platform_device *pdev); |
43 | int (*get_cd)(struct platform_device *pdef); | 38 | int (*get_cd)(struct platform_device *pdef); |
44 | struct sh_mmcif_dma *dma; /* Deprecated. Instead */ | 39 | unsigned int slave_id_tx; /* embedded slave_id_[tr]x */ |
45 | unsigned int slave_id_tx; /* use embedded slave_id_[tr]x */ | ||
46 | unsigned int slave_id_rx; | 40 | unsigned int slave_id_rx; |
47 | u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */ | 41 | u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */ |
48 | unsigned long caps; | 42 | unsigned long caps; |