diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-09-06 15:56:48 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-09-10 23:46:07 +0000 |
commit | e6401d2e83939a63cbd156fa193f9768063d9325 (patch) | |
tree | 334f2a5ed07a79ce8bfc4162e1fc6ddd0ec1373e /common/main.c | |
parent | 462133fea54e7a3c27af23373105bf2f673e37e9 (diff) | |
download | chrome-ec-e6401d2e83939a63cbd156fa193f9768063d9325.tar.gz |
Initalize DMA before UART
This is in preparation for enabling DMA-based UART transfers, to
improve UART performance on STM32.
BUG=chrome-os-partner:20485
BRANCH=none
TEST=Boot pit. Host commands should still be received; this verifies DMA
is still operational.
Change-Id: Ibc3b2e2cd187547eb61b85e4a086704accd7f2fb
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/168810
Diffstat (limited to 'common/main.c')
-rw-r--r-- | common/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c index ec4bc2b48c..12d9f9ec5b 100644 --- a/common/main.c +++ b/common/main.c @@ -10,6 +10,7 @@ #include "common.h" #include "console.h" #include "cpu.h" +#include "dma.h" #include "eeprom.h" #include "eoption.h" #include "flash.h" @@ -90,6 +91,11 @@ test_mockable int main(void) /* Main initialization stage. Modules may enable interrupts here. */ cpu_init(); +#ifdef CONFIG_DMA + /* Initialize DMA. Must be before UART. */ + dma_init(); +#endif + /* Initialize UART. Console output functions may now be used. */ uart_init(); |