Commit 35cc0b97 authored by Anton Vorontsov's avatar Anton Vorontsov Committed by Linus Torvalds

spi_mpc83xx: fix QE+LSB mode shifts

spi_mpc83xx should use other shifts when running in QE+LSB mode.
Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: default avatarKumar Gala <galak@kernel.crashing.org>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 32421daa
......@@ -237,6 +237,14 @@ int mpc83xx_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
} else
return -EINVAL;
if (mpc83xx_spi->qe_mode && spi->mode & SPI_LSB_FIRST) {
mpc83xx_spi->tx_shift = 0;
if (bits_per_word <= 8)
mpc83xx_spi->rx_shift = 8;
else
mpc83xx_spi->rx_shift = 0;
}
/* nsecs = (clock period)/2 */
if (!hz)
hz = spi->max_speed_hz;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment