spi: sirf: fix word width configuration
authorQipan Li <Qipan.Li@csr.com>
Mon, 17 Nov 2014 15:17:02 +0000 (23:17 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 18 Nov 2014 14:43:22 +0000 (14:43 +0000)
commit9c4b19a07dddda3ba35a2eb9b4134d485908e2f5
treed062f5bdbc1fb3ac5c539558cf7f955a9f103491
parentf114040e3ea6e07372334ade75d1ee0775c355e1
spi: sirf: fix word width configuration

commit 8c328a262f ("spi: sirf: Avoid duplicate code in various
bits_per_word cases") is wrong in setting data width register of
fifo is not right, it should use sspi->word_width >> 1 to set
related bits. According to hardware spec, the mapping between
register value and data width:
0 - byte
1 - WORD
2 - DWORD

Fixes: 8c328a262f ("spi: sirf: Avoid duplicate code in various bits_per_word cases") is wrong in setting data width register of
Signed-off-by: Qipan Li <Qipan.Li@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
drivers/spi/spi-sirf.c