]> Git Repo - linux.git/commit
Blackfin SPI Driver: fix bug - spi controller driver does not assert/deassert CS...
authorYi Li <[email protected]>
Tue, 7 Apr 2009 02:00:44 +0000 (19:00 -0700)
committerLinus Torvalds <[email protected]>
Tue, 7 Apr 2009 15:31:06 +0000 (08:31 -0700)
commit2cf3683472f043e6748c48228df6d8a35a47ecc2
tree6a7d950cffc88c9a71d314c58dafd0e3cf77a30c
parenta963ea83b316b0a3ebf1c7118a6c36b5cd334bb6
Blackfin SPI Driver: fix bug - spi controller driver does not assert/deassert CS correctly

This bug can be observed when two SPI devices are sharing the spi bus: One
device is set as SPI CS 7, another one is using SPI CS 4.

In spi_bfin5xx.c: cs_active(), cs_deactive() are used to control SPI_FLG
register.  From the debug bellow:

cs_active: flag: 0x7f91, chip->flag: 0x7f80, cs: 7
cs_active: flag: 0xef91, chip->flag: 0xef10, cs: 4

When device A (cs_7) activate CS 7, SPI_FLG is set as 0x7f91 (however,
SPI_FLG should be set as 0x7f80, or 0x6f91 if in broadcast mode).

Due to some HW bug (very possibly), if SPI_FLG is set as 0x7f91, SPISSEL7
is asserted, however SPISSEL4 will be asserted too (I can see this using
the scope).  This is unreasonable according to HRM.

Signed-off-by: Yi Li <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
Acked-by: David Brownell <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/spi/spi_bfin5xx.c
This page took 0.046884 seconds and 4 git commands to generate.