]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/spi/spi-bcm2835aux.c
Merge remote-tracking branches 'spi/topic/acpi', 'spi/topic/axi-engine', 'spi/topic...
[karo-tx-linux.git] / drivers / spi / spi-bcm2835aux.c
index 7de6f8472a8100656884647ad5447be94604e7bb..d2f0067ff5eadae1aa9f0ee8ede3217ddf91c050 100644 (file)
@@ -73,8 +73,8 @@
 
 /* Bitfields in CNTL1 */
 #define BCM2835_AUX_SPI_CNTL1_CSHIGH   0x00000700
-#define BCM2835_AUX_SPI_CNTL1_IDLE     0x00000080
-#define BCM2835_AUX_SPI_CNTL1_TXEMPTY  0x00000040
+#define BCM2835_AUX_SPI_CNTL1_TXEMPTY  0x00000080
+#define BCM2835_AUX_SPI_CNTL1_IDLE     0x00000040
 #define BCM2835_AUX_SPI_CNTL1_MSBF_IN  0x00000002
 #define BCM2835_AUX_SPI_CNTL1_KEEP_IN  0x00000001
 
@@ -212,6 +212,12 @@ static irqreturn_t bcm2835aux_spi_interrupt(int irq, void *dev_id)
                ret = IRQ_HANDLED;
        }
 
+       if (!bs->tx_len) {
+               /* disable tx fifo empty interrupt */
+               bcm2835aux_wr(bs, BCM2835_AUX_SPI_CNTL1, bs->cntl[1] |
+                       BCM2835_AUX_SPI_CNTL1_IDLE);
+       }
+
        /* and if rx_len is 0 then wake up completion and disable spi */
        if (!bs->rx_len) {
                bcm2835aux_spi_reset_hw(bs);