Chromium Code Reviews| Index: drivers/spi/tegra2_spi.c |
| diff --git a/drivers/spi/tegra2_spi.c b/drivers/spi/tegra2_spi.c |
| index 15a23124027ecdad5fcec23206a0fc67b968872d..07a54b6a66aafe176067c67a9fb7717968f5a33e 100755 |
| --- a/drivers/spi/tegra2_spi.c |
| +++ b/drivers/spi/tegra2_spi.c |
| @@ -155,12 +155,10 @@ void spi_cs_activate(struct spi_slave *slave) |
| volatile spi_tegra_t *spi = (spi_tegra_t *)TEGRA2_SPI_BASE; |
| u32 val; |
| - /* |
| - * Delay here to clean up comms - spurious chars seen around SPI xfers. |
| - * Fine-tune later. |
| - */ |
| - udelay(1000); |
| - |
| +#ifdef CONFIG_SPI_CORRUPTS_UART |
| + NS16550_drain(CONFIG_SPI_CORRUPTS_UART); |
| + NS16550_clear(CONFIG_SPI_CORRUPTS_UART); |
|
robotboy
2011/03/25 00:18:23
Is clear strictly required here? Is just calling
|
| +#endif |
| /* |
| * We need to dynamically change the pinmux, shared w/UART RXD/CTS! |
| */ |
| @@ -193,12 +191,6 @@ void spi_cs_deactivate(struct spi_slave *slave) |
| u32 val; |
| /* |
| - * Delay here to clean up comms - spurious chars seen around SPI xfers. |
| - * Fine-tune later. |
| - */ |
| - udelay(1000); |
| - |
| - /* |
| * Looks like we may also need to dynamically change the pinmux, |
| * shared w/UART RXD/CTS! |
| */ |
| @@ -222,6 +214,11 @@ void spi_cs_deactivate(struct spi_slave *slave) |
| debug("spi_cs_deactivate: CS driven %s\n", |
| (spi->command & SPI_CMD_CS_VAL) ? "LOW" : "HIGH"); |
| + |
| +#ifdef CONFIG_SPI_CORRUPTS_UART |
| + NS16550_drain(CONFIG_SPI_CORRUPTS_UART); |
|
robotboy
2011/03/25 00:18:23
Same question as above, except in this case is dra
|
| + NS16550_clear(CONFIG_SPI_CORRUPTS_UART); |
| +#endif |
| } |
| int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, |