From af12f2f58c001dfa999591c29b055b7ba95379ba Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Tue, 10 Sep 2013 10:25:18 -0700 Subject: stm32: Support DMA-based UART output This reduces the number of UART interrupts by a factor of 12, and reduces the overall interrupt rate on STM32 by a factor of 2. BUG=chrome-os-partner:20485 BRANCH=none (not required for pit branch) TEST=Boot pit. Ctrl+Q pauses debug output; Ctrl+S resumes it. 'crash divzero' still prints a full crash dump. And util/makeall.sh passes builds all platforms and passes tests. Change-Id: I86993e14b436150298dcb2c6d29086cc3c9db418 Signed-off-by: Randall Spangler Reviewed-on: https://chromium-review.googlesource.com/168814 --- include/uart.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/uart.h') diff --git a/include/uart.h b/include/uart.h index fa50645270..fec3fd47ec 100644 --- a/include/uart.h +++ b/include/uart.h @@ -126,6 +126,19 @@ void uart_tx_flush(void); */ int uart_tx_ready(void); +/** + * Return non-zero if UART is ready to start a DMA transfer. + */ +int uart_tx_dma_ready(void); + +/** + * Start a UART transmit DMA transfer + * + * @param src Pointer to data to send + * @param len Length of transfer in bytes + */ +void uart_tx_dma_start(const char *src, int len); + /** * Return non-zero if the UART has a character available to read. */ -- cgit v1.2.1