[tegra:dma] set dma burst size for spi/slink
minwuklee [Mon, 6 Dec 2010 04:55:52 +0000 (13:55 +0900)]
for spi/slink, depending on transfer size,

burst size can be set to 1, 4, or 8.

bug 747979

Original-Change-Id: Ieae0285d374e7d0eb6c2c2e633f8cafbb2b51b3a
Reviewed-on: http://git-master/r/12076
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

Rebase-Id: R366881cc8a4ba50cdd815b97f52b4e7d4dfb1ee6

drivers/spi/spi-tegra.c

index c568b18..619863e 100644 (file)
@@ -201,8 +201,10 @@ static void spi_tegra_go(struct spi_tegra_data *tspi)
        val &= ~SLINK_TX_TRIG_MASK & ~SLINK_RX_TRIG_MASK;
        if (tspi->rx_dma_req.size & 0xF) {
                val |= SLINK_TX_TRIG_1 | SLINK_RX_TRIG_1;
-       } else {
+       } else if ((tspi->rx_dma_req.size >> 4) & 0x1){
                val |= SLINK_TX_TRIG_4 | SLINK_RX_TRIG_4;
+       } else {
+               val |= SLINK_TX_TRIG_8 | SLINK_RX_TRIG_8;
        }
        spi_tegra_writel(tspi, val, SLINK_DMA_CTL);
 }