• Andrea Paterniani's avatar
    spi: spi_imx updates · 5d9f3f6b
    Andrea Paterniani authored
    Updates to the i.MX SPI controller driver:
    
     1) Some comments changed and/or added.
    
     2) End of transfers is now managed on TXFIFO empty interrupt after the
        last write to TXFIFO.  This speeds interrupt execution by removing
        the wait for TXFIFO to become empty.  On TXFIFO empty interrupt the
        handler needs only to poll for the end of the ongoing transaction
        (SPI_CONTROL_XCH) to close the transfer.
         (2.1) Write only transfers are closed flushing RXFIFO.
         (2.2) Read transfers are closed reading trailing bytes from RXFIFO.
         (2.3) Read transfers where RXFIFO overrun occurred are closed by
               flushing RXFIFO and aborting the message.
    
     3) Fifos are now flushed via SPI disable after the end of ongoing
        transaction.
    Signed-off-by: default avatarAndrea Paterniani <a.paterniani@swapp-eng.it>
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    5d9f3f6b
spi_imx.c 45.6 KB