spi-atmel.c (bd89bb78f35fd175db7a9cfc504d789b6ca0f7b0) spi-atmel.c (ef40eb39e0128b42d64bbbf5a6635548f6f68a01)
1/*
2 * Driver for Atmel AT32 and AT91 SPI Controllers
3 *
4 * Copyright (C) 2006 Atmel Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 583 unchanged lines hidden (view full) ---

592 sg_dma_len(&as->dma.sgrx) = len;
593
594 *plen = len;
595
596 if (atmel_spi_dma_slave_config(as, &slave_config, 8))
597 goto err_exit;
598
599 /* Send both scatterlists */
1/*
2 * Driver for Atmel AT32 and AT91 SPI Controllers
3 *
4 * Copyright (C) 2006 Atmel Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 583 unchanged lines hidden (view full) ---

592 sg_dma_len(&as->dma.sgrx) = len;
593
594 *plen = len;
595
596 if (atmel_spi_dma_slave_config(as, &slave_config, 8))
597 goto err_exit;
598
599 /* Send both scatterlists */
600 rxdesc = rxchan->device->device_prep_slave_sg(rxchan,
601 &as->dma.sgrx,
602 1,
603 DMA_FROM_DEVICE,
604 DMA_PREP_INTERRUPT | DMA_CTRL_ACK,
605 NULL);
600 rxdesc = dmaengine_prep_slave_sg(rxchan, &as->dma.sgrx, 1,
601 DMA_FROM_DEVICE,
602 DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
606 if (!rxdesc)
607 goto err_dma;
608
603 if (!rxdesc)
604 goto err_dma;
605
609 txdesc = txchan->device->device_prep_slave_sg(txchan,
610 &as->dma.sgtx,
611 1,
612 DMA_TO_DEVICE,
613 DMA_PREP_INTERRUPT | DMA_CTRL_ACK,
614 NULL);
606 txdesc = dmaengine_prep_slave_sg(txchan, &as->dma.sgtx, 1,
607 DMA_TO_DEVICE,
608 DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
615 if (!txdesc)
616 goto err_dma;
617
618 dev_dbg(master->dev.parent,
619 " start dma xfer %p: len %u tx %p/%08llx rx %p/%08llx\n",
620 xfer, xfer->len, xfer->tx_buf, (unsigned long long)xfer->tx_dma,
621 xfer->rx_buf, (unsigned long long)xfer->rx_dma);
622

--- 892 unchanged lines hidden ---
609 if (!txdesc)
610 goto err_dma;
611
612 dev_dbg(master->dev.parent,
613 " start dma xfer %p: len %u tx %p/%08llx rx %p/%08llx\n",
614 xfer, xfer->len, xfer->tx_buf, (unsigned long long)xfer->tx_dma,
615 xfer->rx_buf, (unsigned long long)xfer->rx_dma);
616

--- 892 unchanged lines hidden ---