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/spi/spi-ep93xx.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/spi/spi-ep93xx.c')
-rw-r--r-- | drivers/spi/spi-ep93xx.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c index 0a282e5fcc9c..d46e55c720b7 100644 --- a/drivers/spi/spi-ep93xx.c +++ b/drivers/spi/spi-ep93xx.c | |||
@@ -551,6 +551,7 @@ ep93xx_spi_dma_prepare(struct ep93xx_spi *espi, enum dma_data_direction dir) | |||
551 | struct dma_async_tx_descriptor *txd; | 551 | struct dma_async_tx_descriptor *txd; |
552 | enum dma_slave_buswidth buswidth; | 552 | enum dma_slave_buswidth buswidth; |
553 | struct dma_slave_config conf; | 553 | struct dma_slave_config conf; |
554 | enum dma_transfer_direction slave_dirn; | ||
554 | struct scatterlist *sg; | 555 | struct scatterlist *sg; |
555 | struct sg_table *sgt; | 556 | struct sg_table *sgt; |
556 | struct dma_chan *chan; | 557 | struct dma_chan *chan; |
@@ -573,6 +574,7 @@ ep93xx_spi_dma_prepare(struct ep93xx_spi *espi, enum dma_data_direction dir) | |||
573 | 574 | ||
574 | conf.src_addr = espi->sspdr_phys; | 575 | conf.src_addr = espi->sspdr_phys; |
575 | conf.src_addr_width = buswidth; | 576 | conf.src_addr_width = buswidth; |
577 | slave_dirn = DMA_DEV_TO_MEM; | ||
576 | } else { | 578 | } else { |
577 | chan = espi->dma_tx; | 579 | chan = espi->dma_tx; |
578 | buf = t->tx_buf; | 580 | buf = t->tx_buf; |
@@ -580,6 +582,7 @@ ep93xx_spi_dma_prepare(struct ep93xx_spi *espi, enum dma_data_direction dir) | |||
580 | 582 | ||
581 | conf.dst_addr = espi->sspdr_phys; | 583 | conf.dst_addr = espi->sspdr_phys; |
582 | conf.dst_addr_width = buswidth; | 584 | conf.dst_addr_width = buswidth; |
585 | slave_dirn = DMA_MEM_TO_DEV; | ||
583 | } | 586 | } |
584 | 587 | ||
585 | ret = dmaengine_slave_config(chan, &conf); | 588 | ret = dmaengine_slave_config(chan, &conf); |
@@ -631,7 +634,7 @@ ep93xx_spi_dma_prepare(struct ep93xx_spi *espi, enum dma_data_direction dir) | |||
631 | return ERR_PTR(-ENOMEM); | 634 | return ERR_PTR(-ENOMEM); |
632 | 635 | ||
633 | txd = chan->device->device_prep_slave_sg(chan, sgt->sgl, nents, | 636 | txd = chan->device->device_prep_slave_sg(chan, sgt->sgl, nents, |
634 | dir, DMA_CTRL_ACK); | 637 | slave_dirn, DMA_CTRL_ACK); |
635 | if (!txd) { | 638 | if (!txd) { |
636 | dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); | 639 | dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); |
637 | return ERR_PTR(-ENOMEM); | 640 | return ERR_PTR(-ENOMEM); |
@@ -979,7 +982,7 @@ static int ep93xx_spi_setup_dma(struct ep93xx_spi *espi) | |||
979 | dma_cap_set(DMA_SLAVE, mask); | 982 | dma_cap_set(DMA_SLAVE, mask); |
980 | 983 | ||
981 | espi->dma_rx_data.port = EP93XX_DMA_SSP; | 984 | espi->dma_rx_data.port = EP93XX_DMA_SSP; |
982 | espi->dma_rx_data.direction = DMA_FROM_DEVICE; | 985 | espi->dma_rx_data.direction = DMA_DEV_TO_MEM; |
983 | espi->dma_rx_data.name = "ep93xx-spi-rx"; | 986 | espi->dma_rx_data.name = "ep93xx-spi-rx"; |
984 | 987 | ||
985 | espi->dma_rx = dma_request_channel(mask, ep93xx_spi_dma_filter, | 988 | espi->dma_rx = dma_request_channel(mask, ep93xx_spi_dma_filter, |
@@ -990,7 +993,7 @@ static int ep93xx_spi_setup_dma(struct ep93xx_spi *espi) | |||
990 | } | 993 | } |
991 | 994 | ||
992 | espi->dma_tx_data.port = EP93XX_DMA_SSP; | 995 | espi->dma_tx_data.port = EP93XX_DMA_SSP; |
993 | espi->dma_tx_data.direction = DMA_TO_DEVICE; | 996 | espi->dma_tx_data.direction = DMA_MEM_TO_DEV; |
994 | espi->dma_tx_data.name = "ep93xx-spi-tx"; | 997 | espi->dma_tx_data.name = "ep93xx-spi-tx"; |
995 | 998 | ||
996 | espi->dma_tx = dma_request_channel(mask, ep93xx_spi_dma_filter, | 999 | espi->dma_tx = dma_request_channel(mask, ep93xx_spi_dma_filter, |