diff options
author | Vinod Koul <vinod.koul@linux.intel.com> | 2011-11-17 04:24:38 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2011-11-17 04:24:57 -0500 |
commit | e0d23ef29ed637dc6bd739f590985746d9ad9caa (patch) | |
tree | c5b5856dc88582697997bb10ccacad6fc2535465 /drivers/mmc/host/mxs-mmc.c | |
parent | ca7fe2db892dcf91b2c72ee352eda4ff867903a7 (diff) | |
parent | 55ba4e5ed4ac57b60fe56acfd324f6a87123cc34 (diff) |
Merge branch 'dma_slave_direction' into next_test_dirn
resolved conflicts:
drivers/media/video/mx3_camera.c
Diffstat (limited to 'drivers/mmc/host/mxs-mmc.c')
-rw-r--r-- | drivers/mmc/host/mxs-mmc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 99b449d26a4d..0a878b181341 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c | |||
@@ -154,6 +154,7 @@ struct mxs_mmc_host { | |||
154 | struct dma_chan *dmach; | 154 | struct dma_chan *dmach; |
155 | struct mxs_dma_data dma_data; | 155 | struct mxs_dma_data dma_data; |
156 | unsigned int dma_dir; | 156 | unsigned int dma_dir; |
157 | enum dma_transfer_direction slave_dirn; | ||
157 | u32 ssp_pio_words[SSP_PIO_NUM]; | 158 | u32 ssp_pio_words[SSP_PIO_NUM]; |
158 | 159 | ||
159 | unsigned int version; | 160 | unsigned int version; |
@@ -324,7 +325,7 @@ static struct dma_async_tx_descriptor *mxs_mmc_prep_dma( | |||
324 | } | 325 | } |
325 | 326 | ||
326 | desc = host->dmach->device->device_prep_slave_sg(host->dmach, | 327 | desc = host->dmach->device->device_prep_slave_sg(host->dmach, |
327 | sgl, sg_len, host->dma_dir, append); | 328 | sgl, sg_len, host->slave_dirn, append); |
328 | if (desc) { | 329 | if (desc) { |
329 | desc->callback = mxs_mmc_dma_irq_callback; | 330 | desc->callback = mxs_mmc_dma_irq_callback; |
330 | desc->callback_param = host; | 331 | desc->callback_param = host; |
@@ -433,6 +434,7 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host) | |||
433 | int i; | 434 | int i; |
434 | 435 | ||
435 | unsigned short dma_data_dir, timeout; | 436 | unsigned short dma_data_dir, timeout; |
437 | enum dma_transfer_direction slave_dirn; | ||
436 | unsigned int data_size = 0, log2_blksz; | 438 | unsigned int data_size = 0, log2_blksz; |
437 | unsigned int blocks = data->blocks; | 439 | unsigned int blocks = data->blocks; |
438 | 440 | ||
@@ -448,9 +450,11 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host) | |||
448 | 450 | ||
449 | if (data->flags & MMC_DATA_WRITE) { | 451 | if (data->flags & MMC_DATA_WRITE) { |
450 | dma_data_dir = DMA_TO_DEVICE; | 452 | dma_data_dir = DMA_TO_DEVICE; |
453 | slave_dirn = DMA_MEM_TO_DEV; | ||
451 | read = 0; | 454 | read = 0; |
452 | } else { | 455 | } else { |
453 | dma_data_dir = DMA_FROM_DEVICE; | 456 | dma_data_dir = DMA_FROM_DEVICE; |
457 | slave_dirn = DMA_DEV_TO_MEM; | ||
454 | read = BM_SSP_CTRL0_READ; | 458 | read = BM_SSP_CTRL0_READ; |
455 | } | 459 | } |
456 | 460 | ||
@@ -518,6 +522,7 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host) | |||
518 | WARN_ON(host->data != NULL); | 522 | WARN_ON(host->data != NULL); |
519 | host->data = data; | 523 | host->data = data; |
520 | host->dma_dir = dma_data_dir; | 524 | host->dma_dir = dma_data_dir; |
525 | host->slave_dirn = slave_dirn; | ||
521 | desc = mxs_mmc_prep_dma(host, 1); | 526 | desc = mxs_mmc_prep_dma(host, 1); |
522 | if (!desc) | 527 | if (!desc) |
523 | goto out; | 528 | goto out; |