diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2009-08-15 10:12:05 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-18 17:09:02 -0400 |
commit | ee2b805c8eb6459cf541ef141ff70dae17af59ca (patch) | |
tree | ca1e0f1988e71f2285ca336d88c5da2c5efa8c71 /drivers/spi/amba-pl022.c | |
parent | a2ca00ea9398265a26eabb358bba83c8b75c463d (diff) |
ARM: 5678/1: SSP/SPI PL022 polarity terminology fix
The definition of the SPI clock phase for the Motorola mode of
the PL022 driver was incorrect: the spec had been interpreted as
data being recieved on rising or falling edge of the clocks while
the correct interpretation is that data can be recieved on the
first or second edge transition, falling or rising depending on
the polarity setting.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/spi/amba-pl022.c')
-rw-r--r-- | drivers/spi/amba-pl022.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c index da76797ce8b9..35521af0d0d7 100644 --- a/drivers/spi/amba-pl022.c +++ b/drivers/spi/amba-pl022.c | |||
@@ -534,7 +534,7 @@ static void restore_state(struct pl022 *pl022) | |||
534 | GEN_MASK_BITS(SSP_DATA_BITS_12, SSP_CR0_MASK_DSS, 0) | \ | 534 | GEN_MASK_BITS(SSP_DATA_BITS_12, SSP_CR0_MASK_DSS, 0) | \ |
535 | GEN_MASK_BITS(SSP_MICROWIRE_CHANNEL_FULL_DUPLEX, SSP_CR0_MASK_HALFDUP, 5) | \ | 535 | GEN_MASK_BITS(SSP_MICROWIRE_CHANNEL_FULL_DUPLEX, SSP_CR0_MASK_HALFDUP, 5) | \ |
536 | GEN_MASK_BITS(SSP_CLK_POL_IDLE_LOW, SSP_CR0_MASK_SPO, 6) | \ | 536 | GEN_MASK_BITS(SSP_CLK_POL_IDLE_LOW, SSP_CR0_MASK_SPO, 6) | \ |
537 | GEN_MASK_BITS(SSP_CLK_FALLING_EDGE, SSP_CR0_MASK_SPH, 7) | \ | 537 | GEN_MASK_BITS(SSP_CLK_SECOND_EDGE, SSP_CR0_MASK_SPH, 7) | \ |
538 | GEN_MASK_BITS(NMDK_SSP_DEFAULT_CLKRATE, SSP_CR0_MASK_SCR, 8) | \ | 538 | GEN_MASK_BITS(NMDK_SSP_DEFAULT_CLKRATE, SSP_CR0_MASK_SCR, 8) | \ |
539 | GEN_MASK_BITS(SSP_BITS_8, SSP_CR0_MASK_CSS, 16) | \ | 539 | GEN_MASK_BITS(SSP_BITS_8, SSP_CR0_MASK_CSS, 16) | \ |
540 | GEN_MASK_BITS(SSP_INTERFACE_MOTOROLA_SPI, SSP_CR0_MASK_FRF, 21) \ | 540 | GEN_MASK_BITS(SSP_INTERFACE_MOTOROLA_SPI, SSP_CR0_MASK_FRF, 21) \ |
@@ -1249,8 +1249,8 @@ static int verify_controller_parameters(struct pl022 *pl022, | |||
1249 | return -EINVAL; | 1249 | return -EINVAL; |
1250 | } | 1250 | } |
1251 | if (chip_info->iface == SSP_INTERFACE_MOTOROLA_SPI) { | 1251 | if (chip_info->iface == SSP_INTERFACE_MOTOROLA_SPI) { |
1252 | if ((chip_info->clk_phase != SSP_CLK_RISING_EDGE) | 1252 | if ((chip_info->clk_phase != SSP_CLK_FIRST_EDGE) |
1253 | && (chip_info->clk_phase != SSP_CLK_FALLING_EDGE)) { | 1253 | && (chip_info->clk_phase != SSP_CLK_SECOND_EDGE)) { |
1254 | dev_err(chip_info->dev, | 1254 | dev_err(chip_info->dev, |
1255 | "Clock Phase is configured incorrectly\n"); | 1255 | "Clock Phase is configured incorrectly\n"); |
1256 | return -EINVAL; | 1256 | return -EINVAL; |
@@ -1487,7 +1487,7 @@ static int pl022_setup(struct spi_device *spi) | |||
1487 | chip_info->data_size = SSP_DATA_BITS_12; | 1487 | chip_info->data_size = SSP_DATA_BITS_12; |
1488 | chip_info->rx_lev_trig = SSP_RX_1_OR_MORE_ELEM; | 1488 | chip_info->rx_lev_trig = SSP_RX_1_OR_MORE_ELEM; |
1489 | chip_info->tx_lev_trig = SSP_TX_1_OR_MORE_EMPTY_LOC; | 1489 | chip_info->tx_lev_trig = SSP_TX_1_OR_MORE_EMPTY_LOC; |
1490 | chip_info->clk_phase = SSP_CLK_FALLING_EDGE; | 1490 | chip_info->clk_phase = SSP_CLK_SECOND_EDGE; |
1491 | chip_info->clk_pol = SSP_CLK_POL_IDLE_LOW; | 1491 | chip_info->clk_pol = SSP_CLK_POL_IDLE_LOW; |
1492 | chip_info->ctrl_len = SSP_BITS_8; | 1492 | chip_info->ctrl_len = SSP_BITS_8; |
1493 | chip_info->wait_state = SSP_MWIRE_WAIT_ZERO; | 1493 | chip_info->wait_state = SSP_MWIRE_WAIT_ZERO; |