summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-11-19 12:50:45 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-11-19 23:16:21 +0000
commit5a35eddf3eea75b0fbb6520c9c9b5441a621df24 (patch)
treeaeeacd729ec45f6e1afae5b07d5d02369f2cbc3e
parentaf2c11e3e39621bc5677b4996fcbbe0e0afe224f (diff)
downloadchrome-ec-5a35eddf3eea75b0fbb6520c9c9b5441a621df24.tar.gz
stm32f: Disable UART receive DMA
Not sure why, but it doesn't seem to work consistently on my Spring. Transmit works fine, but on some boots receive doesn't seem to pick up received characters. Rather than churning Spring to fix this, just disable receive DMA - which doesn't benefit Spring much anyway, because it never downclocks its core to 1 MHz. BUG=chrome-os-partner:24141 BRANCH=none TEST=Boot Spring; typing into console works. After 'apshutdown', typing still works (including arrow keys). Repeat 20 times. Repeat on Pit. Change-Id: I5d9875b583c8e2a38b9070c4dfa31fd5a982a144 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/177352 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--chip/stm32/config-stm32l100.h3
-rw-r--r--chip/stm32/config-stm32l15x.h3
-rw-r--r--chip/stm32/config_chip.h7
3 files changed, 11 insertions, 2 deletions
diff --git a/chip/stm32/config-stm32l100.h b/chip/stm32/config-stm32l100.h
index 2198f6dc0a..a79bd2282e 100644
--- a/chip/stm32/config-stm32l100.h
+++ b/chip/stm32/config-stm32l100.h
@@ -48,3 +48,6 @@
/* Flash erases to 0, not 1 */
#define CONFIG_FLASH_ERASED_VALUE32 0
+
+/* Use DMA for UART receive */
+#define CONFIG_UART_RX_DMA
diff --git a/chip/stm32/config-stm32l15x.h b/chip/stm32/config-stm32l15x.h
index 7d51ca1bda..6e9b862dab 100644
--- a/chip/stm32/config-stm32l15x.h
+++ b/chip/stm32/config-stm32l15x.h
@@ -50,5 +50,8 @@
#undef CONFIG_UART_TX_BUF_SIZE
#define CONFIG_UART_TX_BUF_SIZE 2048
+/* Use DMA for UART receive */
+#define CONFIG_UART_RX_DMA
+
/* Flash erases to 0, not 1 */
#define CONFIG_FLASH_ERASED_VALUE32 0
diff --git a/chip/stm32/config_chip.h b/chip/stm32/config_chip.h
index 5126870d11..4ae81b2e51 100644
--- a/chip/stm32/config_chip.h
+++ b/chip/stm32/config_chip.h
@@ -55,8 +55,11 @@
/* Use DMA */
#define CONFIG_DMA
-/* Use DMA for UART I/O */
-#define CONFIG_UART_RX_DMA
+/*
+ * Use DMA for UART transmit for all platforms. DMA for UART receive is
+ * enabled on a per-chip basis because it doesn't seem to work reliably on
+ * STM32F (see crosbug.com/p/24141).
+ */
#define CONFIG_UART_TX_DMA
/* Flash protection applies to the next boot, not the current one */