spi: rspi: Add DMA support for RSPI on RZ/A1H
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 2 Jun 2014 13:38:18 +0000 (15:38 +0200)
committerMark Brown <broonie@linaro.org>
Mon, 2 Jun 2014 14:49:35 +0000 (15:49 +0100)
Enable DMA support for RSPI on r7s72100 (RZ/A1H).

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-rspi.c

index bec81470dd9c3dfb2ce89e3b2de2e780c83de4b9..4bc4138e002b1b430f588081c8373872b25a2572 100644 (file)
@@ -625,6 +625,9 @@ static int rspi_rz_transfer_one(struct spi_master *master,
 
        rspi_rz_receive_init(rspi);
 
+       if (master->can_dma && __rspi_can_dma(rspi, xfer))
+               return rspi_dma_transfer(rspi, &xfer->tx_sg, &xfer->rx_sg);
+
        ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
        if (ret < 0)
                return ret;