]> git.baikalelectronics.ru Git - kernel.git/commit
spi: spi_sh_msiof: Fixed data sampling on the correct edge
authorMarkus Pietrek <Markus.Pietrek@emtrion.de>
Tue, 2 Feb 2010 02:29:15 +0000 (11:29 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 2 Feb 2010 02:29:15 +0000 (11:29 +0900)
commitdaf2de5f6ff37565dd213411fe7f8d1cd3016233
tree38ef7ec68597da137f49a3e67886503afca82234
parent883843e11c2dc64ddaa4c87a2857093696458bbb
spi: spi_sh_msiof: Fixed data sampling on the correct edge

The spi_sh_msiof.c driver presently misconfigures REDG and TEDG. TEDG==0
outputs data at the **rising edge** of the clock and REDG==0 samples data
at the **falling edge** of the clock. Therefore for SPI, TEDG must be
equal to REDG, otherwise the last byte received is not sampled in SPI
mode 3.

This brings the driver in line with the SH7723 HW Reference Manual
settings documented in Figures 20.20 and 20.21 ("SPI Clock and data
timing").

Signed-off-by: Markus Pietrek <Markus.Pietrek@emtrion.de>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/spi/spi_sh_msiof.c