]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/spi/atmel_spi.c
atmel_spi throughput improvement
[linux-2.6-omap-h63xx.git] / drivers / spi / atmel_spi.c
index ff10808183a36f4e9d642469e42653d50f13ca24..b09d33678dd8fc36c9edcc3c9e9773ba4c1f0d41 100644 (file)
@@ -490,9 +490,14 @@ static int atmel_spi_setup(struct spi_device *spi)
        if (!(spi->mode & SPI_CPHA))
                csr |= SPI_BIT(NCPHA);
 
-       /* TODO: DLYBS and DLYBCT */
-       csr |= SPI_BF(DLYBS, 10);
-       csr |= SPI_BF(DLYBCT, 10);
+       /* DLYBS is mostly irrelevant since we manage chipselect using GPIOs.
+        *
+        * DLYBCT would add delays between words, slowing down transfers.
+        * It could potentially be useful to cope with DMA bottlenecks, but
+        * in those cases it's probably best to just use a lower bitrate.
+        */
+       csr |= SPI_BF(DLYBS, 0);
+       csr |= SPI_BF(DLYBCT, 0);
 
        /* chipselect must have been muxed as GPIO (e.g. in board setup) */
        npcs_pin = (unsigned int)spi->controller_data;