]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: pxa2xx_spi clock polarity fix
authorNed Forrester <nforrester@whoi.edu>
Sun, 24 Feb 2008 02:10:06 +0000 (02:10 +0000)
committerChris Wright <chrisw@sous-sol.org>
Mon, 24 Mar 2008 18:47:22 +0000 (11:47 -0700)
commitd8d644bcd0e46dc2a354ffce219a788630a0cdcc
tree2631b510bfa6022c2682a5165b436ef0c9803e2c
parent55004de819a04430d92aaa5f6c39464862b57028
spi: pxa2xx_spi clock polarity fix

commit: b97c74bddce4e2c6fef6b3b58910b4fd9eb7f3b8

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: Ned Forrester <nforrester@whoi.edu>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[chrisw@sous-sol.org: backport to 2.6.24.3]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/spi/pxa2xx_spi.c
include/asm-arm/arch-pxa/pxa-regs.h