diff options
author | Seungwon Jeon <tgih.jun@samsung.com> | 2012-02-19 21:01:43 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-03-27 12:19:57 -0400 |
commit | 885c3e800cf99db3391247776bfa2d262b21a72b (patch) | |
tree | 665c1e316becaf5eadffec256b22e1908597a842 /drivers/mmc/host | |
parent | 9beee912a3c6e017f03ccefd826b57a6a46c0e31 (diff) |
mmc: dw_mmc: Regression fix for non-IDMAC DMA
3ec7699d3bb1b0ee7 ("mmc: dw_mmc: Add support for pre_req and post_req")
broke non-IDMAC DMA, because dw_mci_pre_dma_transfer() is valid only if
using internal DMA. In case of using other DMA it returns -ENOSYS. It
prevents the DMA operations. This patch makes dw_mci_pre_dma_transfer()
effective in all DMA cases again.
Reported-by: James Hogan <james@albanarts.com>
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/dw_mmc.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 692c3ba30335..bf3c9b456aaf 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c | |||
@@ -429,6 +429,15 @@ static int dw_mci_idmac_init(struct dw_mci *host) | |||
429 | return 0; | 429 | return 0; |
430 | } | 430 | } |
431 | 431 | ||
432 | static struct dw_mci_dma_ops dw_mci_idmac_ops = { | ||
433 | .init = dw_mci_idmac_init, | ||
434 | .start = dw_mci_idmac_start_dma, | ||
435 | .stop = dw_mci_idmac_stop_dma, | ||
436 | .complete = dw_mci_idmac_complete_dma, | ||
437 | .cleanup = dw_mci_dma_cleanup, | ||
438 | }; | ||
439 | #endif /* CONFIG_MMC_DW_IDMAC */ | ||
440 | |||
432 | static int dw_mci_pre_dma_transfer(struct dw_mci *host, | 441 | static int dw_mci_pre_dma_transfer(struct dw_mci *host, |
433 | struct mmc_data *data, | 442 | struct mmc_data *data, |
434 | bool next) | 443 | bool next) |
@@ -468,22 +477,6 @@ static int dw_mci_pre_dma_transfer(struct dw_mci *host, | |||
468 | return sg_len; | 477 | return sg_len; |
469 | } | 478 | } |
470 | 479 | ||
471 | static struct dw_mci_dma_ops dw_mci_idmac_ops = { | ||
472 | .init = dw_mci_idmac_init, | ||
473 | .start = dw_mci_idmac_start_dma, | ||
474 | .stop = dw_mci_idmac_stop_dma, | ||
475 | .complete = dw_mci_idmac_complete_dma, | ||
476 | .cleanup = dw_mci_dma_cleanup, | ||
477 | }; | ||
478 | #else | ||
479 | static int dw_mci_pre_dma_transfer(struct dw_mci *host, | ||
480 | struct mmc_data *data, | ||
481 | bool next) | ||
482 | { | ||
483 | return -ENOSYS; | ||
484 | } | ||
485 | #endif /* CONFIG_MMC_DW_IDMAC */ | ||
486 | |||
487 | static void dw_mci_pre_req(struct mmc_host *mmc, | 480 | static void dw_mci_pre_req(struct mmc_host *mmc, |
488 | struct mmc_request *mrq, | 481 | struct mmc_request *mrq, |
489 | bool is_first_req) | 482 | bool is_first_req) |