diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-02-12 21:18:15 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-15 20:11:05 -0500 |
commit | d31ad46f58e89fdb9f5b902aa7cc29689e123dde (patch) | |
tree | ddf0bd5c0064734181b14cce51a5affa2d555b6d /drivers | |
parent | 7961656a6f11b69966500d7bd25273203fd930da (diff) |
spi: sun6i: Fix define for SUN6I_TFR_CTL_CS_MASK
Current code in sun6i_spi_set_cs() actually clears CPHA and CPOL bits which is
obvious wrong. The define for SUN6I_TFR_CTL_CS_MASK is wrong. Fix it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi-sun6i.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c index 94d38d0a86cd..4b9ec08022fe 100644 --- a/drivers/spi/spi-sun6i.c +++ b/drivers/spi/spi-sun6i.c | |||
@@ -36,8 +36,8 @@ | |||
36 | #define SUN6I_TFR_CTL_CPHA BIT(0) | 36 | #define SUN6I_TFR_CTL_CPHA BIT(0) |
37 | #define SUN6I_TFR_CTL_CPOL BIT(1) | 37 | #define SUN6I_TFR_CTL_CPOL BIT(1) |
38 | #define SUN6I_TFR_CTL_SPOL BIT(2) | 38 | #define SUN6I_TFR_CTL_SPOL BIT(2) |
39 | #define SUN6I_TFR_CTL_CS_MASK 0x3 | 39 | #define SUN6I_TFR_CTL_CS_MASK 0x30 |
40 | #define SUN6I_TFR_CTL_CS(cs) (((cs) & SUN6I_TFR_CTL_CS_MASK) << 4) | 40 | #define SUN6I_TFR_CTL_CS(cs) (((cs) << 4) & SUN6I_TFR_CTL_CS_MASK) |
41 | #define SUN6I_TFR_CTL_CS_MANUAL BIT(6) | 41 | #define SUN6I_TFR_CTL_CS_MANUAL BIT(6) |
42 | #define SUN6I_TFR_CTL_CS_LEVEL BIT(7) | 42 | #define SUN6I_TFR_CTL_CS_LEVEL BIT(7) |
43 | #define SUN6I_TFR_CTL_DHB BIT(8) | 43 | #define SUN6I_TFR_CTL_DHB BIT(8) |