diff options
author | Imre Deak <imre.deak@solidboot.com> | 2007-05-23 13:58:20 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-23 20:14:15 -0700 |
commit | e5f1b194a9afa3e686986839eb67620e6549e9ad (patch) | |
tree | 614bf0abccdeefc7f8e68e42ae5947ba79e89a51 /drivers/spi | |
parent | 81fc632355834b7133ec4f3341cfb171bd9edc31 (diff) | |
download | talos-obmc-linux-e5f1b194a9afa3e686986839eb67620e6549e9ad.tar.gz talos-obmc-linux-e5f1b194a9afa3e686986839eb67620e6549e9ad.zip |
omap_uwire: SPI_CPHA mode bugfix
The omap_uwire controller driver handles SPI_CPHA incorrectly;
It should mean:
CPHA=0 ... sample at leading edge of clock
CPHA=1 ... sample at trailing edge of clock
This bug has been masked by inverse bugs in layered drivers;
and was uncovered by running some of them on non-OMAP hardware.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/omap_uwire.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/omap_uwire.c b/drivers/spi/omap_uwire.c index 96f62b2df300..95183e1df525 100644 --- a/drivers/spi/omap_uwire.c +++ b/drivers/spi/omap_uwire.c @@ -358,11 +358,11 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t) switch (spi->mode & (SPI_CPOL | SPI_CPHA)) { case SPI_MODE_0: case SPI_MODE_3: - flags |= UWIRE_WRITE_RISING_EDGE | UWIRE_READ_FALLING_EDGE; + flags |= UWIRE_WRITE_FALLING_EDGE | UWIRE_READ_RISING_EDGE; break; case SPI_MODE_1: case SPI_MODE_2: - flags |= UWIRE_WRITE_FALLING_EDGE | UWIRE_READ_RISING_EDGE; + flags |= UWIRE_WRITE_RISING_EDGE | UWIRE_READ_FALLING_EDGE; break; } |