summaryrefslogtreecommitdiff
path: root/chip/stm32/registers.h
diff options
context:
space:
mode:
authorPhilip Chen <philipchen@google.com>2017-08-10 13:52:25 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-08-15 18:29:22 -0700
commitabd446b806d4f4367d4649db0a84df56a47ed0b5 (patch)
treef420cf09bb2880650020d0553c51e04ca57ac05f /chip/stm32/registers.h
parentf747f70816ca825a4ff4f9c6234f97e93611dbaa (diff)
downloadchrome-ec-abd446b806d4f4367d4649db0a84df56a47ed0b5.tar.gz
scarlet: Remap DMA channels for USART1
To enable console with DMA, we need to specifically remap DMA channels for USART1. ch2/3 and ch6/7 are already used by SPI1/2 modules. So we have to remap USART1_TX to ch4 and USART1_RX to ch5. BUG=b:64575809 BRANCH=none TEST=confirm ec console works on scarlet rev1 Change-Id: Ie2bb141c72252aee98e4cd4a284a01b4d57605f4 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/611147 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'chip/stm32/registers.h')
-rw-r--r--chip/stm32/registers.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/chip/stm32/registers.h b/chip/stm32/registers.h
index 3e1bf1df14..918afaf974 100644
--- a/chip/stm32/registers.h
+++ b/chip/stm32/registers.h
@@ -2144,7 +2144,8 @@ typedef volatile struct stm32_dma_regs stm32_dma_regs_t;
#else /* !CHIP_FAMILY_STM32F4 */
#define STM32_DMA_CCR_CHANNEL(channel) (0)
-#if defined(CHIP_FAMILY_STM32F3) || defined(CHIP_FAMILY_STM32L4)
+#if defined(CHIP_FAMILY_STM32F3) || defined(CHIP_FAMILY_STM32L4) || \
+ defined(CHIP_VARIANT_STM32F09X)
#define STM32_DMA2_REGS ((stm32_dma_regs_t *)STM32_DMA2_BASE)
#define STM32_DMA_REGS(channel) \
((channel) < STM32_DMAC_PER_CTLR ? STM32_DMA1_REGS : STM32_DMA2_REGS)