]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: fsl-dspi: Fix CTAR selection
authorAlexander Stein <alexander.stein@systec-electronic.com>
Tue, 4 Nov 2014 08:20:18 +0000 (09:20 +0100)
committerJiri Slaby <jslaby@suse.cz>
Thu, 13 Nov 2014 18:02:48 +0000 (19:02 +0100)
commit35a3997ba76f408d13266a1e4cf01bbd264f9332
tree7f702ab78c11f1ea959cc59e5442f721c5196929
parentd0ef4acce233803e2113b9e6b2c6f8400e48a9fe
spi: fsl-dspi: Fix CTAR selection

commit 5cc7b04740effa5cc0af53f434134b5859d58b73 upstream.

There are only 4 CTAR registers (CTAR0 - CTAR3) so we can only use the
lower 2 bits of the chip select to select a CTAR register.
SPI_PUSHR_CTAS used the lower 3 bits which would result in wrong bit values
if the chip selects 4/5 are used. For those chip selects SPI_CTAR even
calculated offsets of non-existing registers.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/spi/spi-fsl-dspi.c