diff options
author | Vinod Koul <vinod.koul@linux.intel.com> | 2011-10-14 01:15:11 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2011-10-31 00:10:25 -0400 |
commit | 05f5799cbe5c9e2c03f604b3de5783cf4d726227 (patch) | |
tree | c70394eb8154fb5e717168af98889631078789e7 /drivers/mmc/host/atmel-mci.c | |
parent | 1d0c81e876fe04295ef5df387ba057bf9cfae3d8 (diff) |
mmc-host: move to dma_transfer_direction
fixup usage of dma direction by introducing dma_transfer_direction,
this patch moves mmc drivers to use new enum
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/mmc/host/atmel-mci.c')
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index fa8cae1d7005..ac87803ab70e 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c | |||
@@ -653,6 +653,7 @@ atmci_prepare_data_dma(struct atmel_mci *host, struct mmc_data *data) | |||
653 | struct scatterlist *sg; | 653 | struct scatterlist *sg; |
654 | unsigned int i; | 654 | unsigned int i; |
655 | enum dma_data_direction direction; | 655 | enum dma_data_direction direction; |
656 | enum dma_transfer_direction slave_dirn; | ||
656 | unsigned int sglen; | 657 | unsigned int sglen; |
657 | 658 | ||
658 | /* | 659 | /* |
@@ -681,16 +682,19 @@ atmci_prepare_data_dma(struct atmel_mci *host, struct mmc_data *data) | |||
681 | if (atmci_is_mci2()) | 682 | if (atmci_is_mci2()) |
682 | mci_writel(host, DMA, MCI_DMA_CHKSIZE(3) | MCI_DMAEN); | 683 | mci_writel(host, DMA, MCI_DMA_CHKSIZE(3) | MCI_DMAEN); |
683 | 684 | ||
684 | if (data->flags & MMC_DATA_READ) | 685 | if (data->flags & MMC_DATA_READ) { |
685 | direction = DMA_FROM_DEVICE; | 686 | direction = DMA_FROM_DEVICE; |
686 | else | 687 | slave_dirn = DMA_DEV_TO_MEM; |
688 | } else { | ||
687 | direction = DMA_TO_DEVICE; | 689 | direction = DMA_TO_DEVICE; |
690 | slave_dirn = DMA_MEM_TO_DEV; | ||
691 | } | ||
688 | 692 | ||
689 | sglen = dma_map_sg(chan->device->dev, data->sg, | 693 | sglen = dma_map_sg(chan->device->dev, data->sg, |
690 | data->sg_len, direction); | 694 | data->sg_len, direction); |
691 | 695 | ||
692 | desc = chan->device->device_prep_slave_sg(chan, | 696 | desc = chan->device->device_prep_slave_sg(chan, |
693 | data->sg, sglen, direction, | 697 | data->sg, sglen, slave_dirn, |
694 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 698 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
695 | if (!desc) | 699 | if (!desc) |
696 | goto unmap_exit; | 700 | goto unmap_exit; |