aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-29 18:34:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-29 18:34:57 -0400
commitef08e78268423fc4d7fbc3e54bd9a67fc8da7cc5 (patch)
treed0561d3ef89c9cd277a38168e33850666cbd33c4 /drivers/spi
parent71db34fc4330f7c784397acb9f1e6ee7f7b32eb2 (diff)
parent5b2e02e401deb44e7f5befe19404d8b2688efea4 (diff)
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine update from Vinod Koul: "This includes the cookie cleanup by Russell, the addition of context parameter for dmaengine APIs, more arm dmaengine driver cleanup by moving code to dmaengine, this time for imx by Javier and pl330 by Boojin along with the usual driver fixes." Fix up some fairly trivial conflicts with various other cleanups. * 'next' of git://git.infradead.org/users/vkoul/slave-dma: (67 commits) dmaengine: imx: fix the build failure on x86_64 dmaengine: i.MX: Fix merge of cookie branch. dmaengine: i.MX: Add support for interleaved transfers. dmaengine: imx-dma: use 'dev_dbg' and 'dev_warn' for messages. dmaengine: imx-dma: remove 'imx_dmav1_baseaddr' and 'dma_clk'. dmaengine: imx-dma: remove unused arg of imxdma_sg_next. dmaengine: imx-dma: remove internal structure. dmaengine: imx-dma: remove 'resbytes' field of 'internal' structure. dmaengine: imx-dma: remove 'in_use' field of 'internal' structure. dmaengine: imx-dma: remove sg member from internal structure. dmaengine: imx-dma: remove 'imxdma_setup_sg_hw' function. dmaengine: imx-dma: remove 'imxdma_config_channel_hw' function. dmaengine: imx-dma: remove 'imxdma_setup_mem2mem_hw' function. dmaengine: imx-dma: remove dma_mode member of internal structure. dmaengine: imx-dma: remove data member from internal structure. dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c dmaengine: at_hdmac: add slave config operation dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic dmaengine/dma_slave: introduce inline wrappers dma: imx-sdma: Treat firmware messages as warnings instead of erros ...
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-dw-mid.c7
-rw-r--r--drivers/spi/spi-ep93xx.c4
-rw-r--r--drivers/spi/spi-pl022.c6
-rw-r--r--drivers/spi/spi-topcliff-pch.c4
4 files changed, 13 insertions, 8 deletions
diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c
index 8418eb036651..b9f0192758d6 100644
--- a/drivers/spi/spi-dw-mid.c
+++ b/drivers/spi/spi-dw-mid.c
@@ -22,6 +22,7 @@
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/slab.h> 23#include <linux/slab.h>
24#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
25#include <linux/types.h>
25 26
26#include "spi-dw.h" 27#include "spi-dw.h"
27 28
@@ -136,6 +137,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change)
136 txconf.dst_maxburst = LNW_DMA_MSIZE_16; 137 txconf.dst_maxburst = LNW_DMA_MSIZE_16;
137 txconf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; 138 txconf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
138 txconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; 139 txconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
140 txconf.device_fc = false;
139 141
140 txchan->device->device_control(txchan, DMA_SLAVE_CONFIG, 142 txchan->device->device_control(txchan, DMA_SLAVE_CONFIG,
141 (unsigned long) &txconf); 143 (unsigned long) &txconf);
@@ -144,7 +146,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change)
144 dws->tx_sgl.dma_address = dws->tx_dma; 146 dws->tx_sgl.dma_address = dws->tx_dma;
145 dws->tx_sgl.length = dws->len; 147 dws->tx_sgl.length = dws->len;
146 148
147 txdesc = txchan->device->device_prep_slave_sg(txchan, 149 txdesc = dmaengine_prep_slave_sg(txchan,
148 &dws->tx_sgl, 150 &dws->tx_sgl,
149 1, 151 1,
150 DMA_MEM_TO_DEV, 152 DMA_MEM_TO_DEV,
@@ -158,6 +160,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change)
158 rxconf.src_maxburst = LNW_DMA_MSIZE_16; 160 rxconf.src_maxburst = LNW_DMA_MSIZE_16;
159 rxconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; 161 rxconf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
160 rxconf.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; 162 rxconf.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
163 rxconf.device_fc = false;
161 164
162 rxchan->device->device_control(rxchan, DMA_SLAVE_CONFIG, 165 rxchan->device->device_control(rxchan, DMA_SLAVE_CONFIG,
163 (unsigned long) &rxconf); 166 (unsigned long) &rxconf);
@@ -166,7 +169,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change)
166 dws->rx_sgl.dma_address = dws->rx_dma; 169 dws->rx_sgl.dma_address = dws->rx_dma;
167 dws->rx_sgl.length = dws->len; 170 dws->rx_sgl.length = dws->len;
168 171
169 rxdesc = rxchan->device->device_prep_slave_sg(rxchan, 172 rxdesc = dmaengine_prep_slave_sg(rxchan,
170 &dws->rx_sgl, 173 &dws->rx_sgl,
171 1, 174 1,
172 DMA_DEV_TO_MEM, 175 DMA_DEV_TO_MEM,
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c
index d46e55c720b7..6db2887852d6 100644
--- a/drivers/spi/spi-ep93xx.c
+++ b/drivers/spi/spi-ep93xx.c
@@ -633,8 +633,8 @@ ep93xx_spi_dma_prepare(struct ep93xx_spi *espi, enum dma_data_direction dir)
633 if (!nents) 633 if (!nents)
634 return ERR_PTR(-ENOMEM); 634 return ERR_PTR(-ENOMEM);
635 635
636 txd = chan->device->device_prep_slave_sg(chan, sgt->sgl, nents, 636 txd = dmaengine_prep_slave_sg(chan, sgt->sgl, nents,
637 slave_dirn, DMA_CTRL_ACK); 637 slave_dirn, DMA_CTRL_ACK);
638 if (!txd) { 638 if (!txd) {
639 dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir); 639 dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir);
640 return ERR_PTR(-ENOMEM); 640 return ERR_PTR(-ENOMEM);
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index dc8485d1e883..96f0da66b185 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -880,10 +880,12 @@ static int configure_dma(struct pl022 *pl022)
880 struct dma_slave_config rx_conf = { 880 struct dma_slave_config rx_conf = {
881 .src_addr = SSP_DR(pl022->phybase), 881 .src_addr = SSP_DR(pl022->phybase),
882 .direction = DMA_DEV_TO_MEM, 882 .direction = DMA_DEV_TO_MEM,
883 .device_fc = false,
883 }; 884 };
884 struct dma_slave_config tx_conf = { 885 struct dma_slave_config tx_conf = {
885 .dst_addr = SSP_DR(pl022->phybase), 886 .dst_addr = SSP_DR(pl022->phybase),
886 .direction = DMA_MEM_TO_DEV, 887 .direction = DMA_MEM_TO_DEV,
888 .device_fc = false,
887 }; 889 };
888 unsigned int pages; 890 unsigned int pages;
889 int ret; 891 int ret;
@@ -1017,7 +1019,7 @@ static int configure_dma(struct pl022 *pl022)
1017 goto err_tx_sgmap; 1019 goto err_tx_sgmap;
1018 1020
1019 /* Send both scatterlists */ 1021 /* Send both scatterlists */
1020 rxdesc = rxchan->device->device_prep_slave_sg(rxchan, 1022 rxdesc = dmaengine_prep_slave_sg(rxchan,
1021 pl022->sgt_rx.sgl, 1023 pl022->sgt_rx.sgl,
1022 rx_sglen, 1024 rx_sglen,
1023 DMA_DEV_TO_MEM, 1025 DMA_DEV_TO_MEM,
@@ -1025,7 +1027,7 @@ static int configure_dma(struct pl022 *pl022)
1025 if (!rxdesc) 1027 if (!rxdesc)
1026 goto err_rxdesc; 1028 goto err_rxdesc;
1027 1029
1028 txdesc = txchan->device->device_prep_slave_sg(txchan, 1030 txdesc = dmaengine_prep_slave_sg(txchan,
1029 pl022->sgt_tx.sgl, 1031 pl022->sgt_tx.sgl,
1030 tx_sglen, 1032 tx_sglen,
1031 DMA_MEM_TO_DEV, 1033 DMA_MEM_TO_DEV,
diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
index 5c6fa5ed3366..ec47d3bdfd13 100644
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -1099,7 +1099,7 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
1099 sg_dma_address(sg) = dma->rx_buf_dma + sg->offset; 1099 sg_dma_address(sg) = dma->rx_buf_dma + sg->offset;
1100 } 1100 }
1101 sg = dma->sg_rx_p; 1101 sg = dma->sg_rx_p;
1102 desc_rx = dma->chan_rx->device->device_prep_slave_sg(dma->chan_rx, sg, 1102 desc_rx = dmaengine_prep_slave_sg(dma->chan_rx, sg,
1103 num, DMA_DEV_TO_MEM, 1103 num, DMA_DEV_TO_MEM,
1104 DMA_PREP_INTERRUPT | DMA_CTRL_ACK); 1104 DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
1105 if (!desc_rx) { 1105 if (!desc_rx) {
@@ -1158,7 +1158,7 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
1158 sg_dma_address(sg) = dma->tx_buf_dma + sg->offset; 1158 sg_dma_address(sg) = dma->tx_buf_dma + sg->offset;
1159 } 1159 }
1160 sg = dma->sg_tx_p; 1160 sg = dma->sg_tx_p;
1161 desc_tx = dma->chan_tx->device->device_prep_slave_sg(dma->chan_tx, 1161 desc_tx = dmaengine_prep_slave_sg(dma->chan_tx,
1162 sg, num, DMA_MEM_TO_DEV, 1162 sg, num, DMA_MEM_TO_DEV,
1163 DMA_PREP_INTERRUPT | DMA_CTRL_ACK); 1163 DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
1164 if (!desc_tx) { 1164 if (!desc_tx) {