spi: fsl-dspi: Fix CTAR selection
authorAlexander Stein <alexander.stein@systec-electronic.com>
Tue, 4 Nov 2014 08:20:18 +0000 (09:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 17:00:05 +0000 (09:00 -0800)
commit8421b7744ec88ef1055ca793277e824d3cca9d12
treead444b33ffac7f99eae0f93f3a782587f5531d32
parentfab420531d95f384ad52a905936753e6162f9f14
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-fsl-dspi.c