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

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: Moved the hack to SPI only 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..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,
« 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