aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-23 19:11:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-23 19:11:56 -0400
commite66d637134b7045ea6f14bdd416cd3695f73ed42 (patch)
tree09186dbf65d236179f9a2616d0be7a25154f8822 /drivers
parent5e512d0785e67d9ff41ee4af39bb71fc6161d5c9 (diff)
parent31dfec74c0dc49521b2e17543ff9dd9dd0221702 (diff)
Merge tag 'dma' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull samsung arm-soc dma changes from Arnd Bergmann: "Some platforms are not yet converted to use the dmaengine framework, including some of the samsung SoCs. In the meantime, we treat this as platform code and merge the patches through the arm-soc tree." * tag 'dma' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: SAMSUNG: Fix compiler warning in dma-ops.c file ASoC: follow the updated samsung DMA common operations spi/s3c64xx: Add the use of DMA config operation ARM: SAMSUNG: Add config() function in DMA common operations
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-s3c64xx.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 972a94c58be3..3c36cfaa1b93 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -262,14 +262,24 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma,
262 unsigned len, dma_addr_t buf) 262 unsigned len, dma_addr_t buf)
263{ 263{
264 struct s3c64xx_spi_driver_data *sdd; 264 struct s3c64xx_spi_driver_data *sdd;
265 struct samsung_dma_prep_info info; 265 struct samsung_dma_prep info;
266 struct samsung_dma_config config;
266 267
267 if (dma->direction == DMA_DEV_TO_MEM) 268 if (dma->direction == DMA_DEV_TO_MEM) {
268 sdd = container_of((void *)dma, 269 sdd = container_of((void *)dma,
269 struct s3c64xx_spi_driver_data, rx_dma); 270 struct s3c64xx_spi_driver_data, rx_dma);
270 else 271 config.direction = sdd->rx_dma.direction;
272 config.fifo = sdd->sfr_start + S3C64XX_SPI_RX_DATA;
273 config.width = sdd->cur_bpw / 8;
274 sdd->ops->config(sdd->rx_dma.ch, &config);
275 } else {
271 sdd = container_of((void *)dma, 276 sdd = container_of((void *)dma,
272 struct s3c64xx_spi_driver_data, tx_dma); 277 struct s3c64xx_spi_driver_data, tx_dma);
278 config.direction = sdd->tx_dma.direction;
279 config.fifo = sdd->sfr_start + S3C64XX_SPI_TX_DATA;
280 config.width = sdd->cur_bpw / 8;
281 sdd->ops->config(sdd->tx_dma.ch, &config);
282 }
273 283
274 info.cap = DMA_SLAVE; 284 info.cap = DMA_SLAVE;
275 info.len = len; 285 info.len = len;
@@ -284,20 +294,15 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma,
284 294
285static int acquire_dma(struct s3c64xx_spi_driver_data *sdd) 295static int acquire_dma(struct s3c64xx_spi_driver_data *sdd)
286{ 296{
287 struct samsung_dma_info info; 297 struct samsung_dma_req req;
288 298
289 sdd->ops = samsung_dma_get_ops(); 299 sdd->ops = samsung_dma_get_ops();
290 300
291 info.cap = DMA_SLAVE; 301 req.cap = DMA_SLAVE;
292 info.client = &s3c64xx_spi_dma_client; 302 req.client = &s3c64xx_spi_dma_client;
293 info.width = sdd->cur_bpw / 8; 303
294 304 sdd->rx_dma.ch = sdd->ops->request(sdd->rx_dma.dmach, &req);
295 info.direction = sdd->rx_dma.direction; 305 sdd->tx_dma.ch = sdd->ops->request(sdd->tx_dma.dmach, &req);
296 info.fifo = sdd->sfr_start + S3C64XX_SPI_RX_DATA;
297 sdd->rx_dma.ch = sdd->ops->request(sdd->rx_dma.dmach, &info);
298 info.direction = sdd->tx_dma.direction;
299 info.fifo = sdd->sfr_start + S3C64XX_SPI_TX_DATA;
300 sdd->tx_dma.ch = sdd->ops->request(sdd->tx_dma.dmach, &info);
301 306
302 return 1; 307 return 1;
303} 308}