• Ned Forrester's avatar
    spi: pxa2xx_spi clock polarity fix · b97c74bd
    Ned Forrester authored
    
    
    Fixes a sequencing bug in spi driver pxa2xx_spi.c in which the chip select
    for a transfer may be asserted before the clock polarity is set on the
    interface.  As a result of this bug, the clock signal may have the wrong
    polarity at transfer start, so it may need to make an extra half transition
    before the intended clock/data signals begin.  (This probably means all
    transfers are one bit out of sequence.)
    
    This only occurs on the first transfer following a change in clock polarity
    in systems using more than one more than one such polarity.  The fix
    assures that the clock mode is properly set before asserting chip select.
    
    This bug was introduced in a patch merged on 2006/12/10, kernel 2.6.20.
    The patch defines an additional bit in: include/asm-arm/arch-pxa/regs-ssp.h
    for 2.6.25 and newer kernels but this addition must be made in:
    include/asm-arm/arch-pxa/pxa-regs.h for kernels between 2.6.20 and 2.6.24,
    inclusive
    Signed-off-by: default avatarNed Forrester <nforrester@whoi.edu>
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Cc: Russell King <rmk@arm.linux.org.uk>
    Cc: <stable@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b97c74bd
pxa2xx_spi.c 41.5 KB