Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3127)

Unified Diff: drivers/spi/tegra2_spi.c

Issue 6715017: Fix Seaboard UART corruption on SPI activity (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/u-boot-next.git@chromeos-v2010.09
Patch Set: Chopped back a little Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « drivers/serial/ns16550.c ('k') | include/configs/chromeos/tegra2/seaboard/parts/uart.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: drivers/spi/tegra2_spi.c
diff --git a/drivers/spi/tegra2_spi.c b/drivers/spi/tegra2_spi.c
index 15a23124027ecdad5fcec23206a0fc67b968872d..177bc71b0d148825131f8f231cd1365de5d6d51c 100755
--- a/drivers/spi/tegra2_spi.c
+++ b/drivers/spi/tegra2_spi.c
@@ -155,12 +155,9 @@ 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);
+#endif
/*
* We need to dynamically change the pinmux, shared w/UART RXD/CTS!
*/
@@ -193,12 +190,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 +213,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
+ udelay(100);
+ NS16550_clear(CONFIG_SPI_CORRUPTS_UART);
+#endif
}
int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
« no previous file with comments | « drivers/serial/ns16550.c ('k') | include/configs/chromeos/tegra2/seaboard/parts/uart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698