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 /chip | |
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 'chip')
-rw-r--r-- | chip/stm32/config_chip.h | 3 | ||||
-rw-r--r-- | chip/stm32/dma.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/chip/stm32/config_chip.h b/chip/stm32/config_chip.h index 40de499fd5..fa839287e0 100644 --- a/chip/stm32/config_chip.h +++ b/chip/stm32/config_chip.h @@ -47,6 +47,9 @@ */ #define CONFIG_WATCHDOG_HELP +/* Use DMA */ +#define CONFIG_DMA + /* Flash protection applies to the next boot, not the current one */ #define CONFIG_FLASH_PROTECT_NEXT_BOOT diff --git a/chip/stm32/dma.c b/chip/stm32/dma.c index c4eb08d4ec..06da15e1b6 100644 --- a/chip/stm32/dma.c +++ b/chip/stm32/dma.c @@ -182,7 +182,7 @@ void dma_test(void) } #endif /* CONFIG_DMA_HELP */ -static void dma_init(void) +void dma_init(void) { int i; @@ -193,7 +193,6 @@ static void dma_init(void) for (i = 0; i < STM32_DMAC_COUNT; i++) id[i] = TASK_ID_INVALID; } -DECLARE_HOOK(HOOK_INIT, dma_init, HOOK_PRIO_INIT_DMA); int dma_wait(enum dma_channel channel) { |