diff options
Diffstat (limited to 'drivers/spi/spi-atmel.c')
-rw-r--r-- | drivers/spi/spi-atmel.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 92a6f0d93233..113c83f44b5c 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c | |||
@@ -597,21 +597,15 @@ static int atmel_spi_next_xfer_dma_submit(struct spi_master *master, | |||
597 | goto err_exit; | 597 | goto err_exit; |
598 | 598 | ||
599 | /* Send both scatterlists */ | 599 | /* Send both scatterlists */ |
600 | rxdesc = rxchan->device->device_prep_slave_sg(rxchan, | 600 | rxdesc = dmaengine_prep_slave_sg(rxchan, &as->dma.sgrx, 1, |
601 | &as->dma.sgrx, | 601 | DMA_FROM_DEVICE, |
602 | 1, | 602 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
603 | DMA_FROM_DEVICE, | ||
604 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK, | ||
605 | NULL); | ||
606 | if (!rxdesc) | 603 | if (!rxdesc) |
607 | goto err_dma; | 604 | goto err_dma; |
608 | 605 | ||
609 | txdesc = txchan->device->device_prep_slave_sg(txchan, | 606 | txdesc = dmaengine_prep_slave_sg(txchan, &as->dma.sgtx, 1, |
610 | &as->dma.sgtx, | 607 | DMA_TO_DEVICE, |
611 | 1, | 608 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
612 | DMA_TO_DEVICE, | ||
613 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK, | ||
614 | NULL); | ||
615 | if (!txdesc) | 609 | if (!txdesc) |
616 | goto err_dma; | 610 | goto err_dma; |
617 | 611 | ||
@@ -1018,7 +1012,7 @@ static int atmel_spi_setup(struct spi_device *spi) | |||
1018 | csr |= SPI_BF(DLYBCT, 0); | 1012 | csr |= SPI_BF(DLYBCT, 0); |
1019 | 1013 | ||
1020 | /* chipselect must have been muxed as GPIO (e.g. in board setup) */ | 1014 | /* chipselect must have been muxed as GPIO (e.g. in board setup) */ |
1021 | npcs_pin = (unsigned int)spi->controller_data; | 1015 | npcs_pin = (unsigned long)spi->controller_data; |
1022 | 1016 | ||
1023 | if (gpio_is_valid(spi->cs_gpio)) | 1017 | if (gpio_is_valid(spi->cs_gpio)) |
1024 | npcs_pin = spi->cs_gpio; | 1018 | npcs_pin = spi->cs_gpio; |
@@ -1253,7 +1247,7 @@ msg_done: | |||
1253 | static void atmel_spi_cleanup(struct spi_device *spi) | 1247 | static void atmel_spi_cleanup(struct spi_device *spi) |
1254 | { | 1248 | { |
1255 | struct atmel_spi_device *asd = spi->controller_state; | 1249 | struct atmel_spi_device *asd = spi->controller_state; |
1256 | unsigned gpio = (unsigned) spi->controller_data; | 1250 | unsigned gpio = (unsigned long) spi->controller_data; |
1257 | 1251 | ||
1258 | if (!asd) | 1252 | if (!asd) |
1259 | return; | 1253 | return; |