summaryrefslogtreecommitdiff
path: root/chip/stm32/dma-stm32f4.c
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2017-11-09 13:43:58 +0100
committerchrome-bot <chrome-bot@chromium.org>2018-01-08 05:41:23 -0800
commite24a3953c2c23df219fc0c735e0c188fd8edbded (patch)
treed1b36505f04da9767ba75513287364f86f9b5eeb /chip/stm32/dma-stm32f4.c
parent57bb4ddf4163dbe3da48ba56464adbabfa596344 (diff)
downloadchrome-ec-e24a3953c2c23df219fc0c735e0c188fd8edbded.tar.gz
stm32: Add STM32H7 family
Start adding support for the STM32H7 family of device and the first available one the STM32H743. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=b:67081508 TEST=manual, run on stm32h743i-eval and zerblebarn boards get a stable serial console. Change-Id: I9ae10f0d843e5318451713c21ed22d455a23758c Reviewed-on: https://chromium-review.googlesource.com/806168 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'chip/stm32/dma-stm32f4.c')
-rw-r--r--chip/stm32/dma-stm32f4.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/chip/stm32/dma-stm32f4.c b/chip/stm32/dma-stm32f4.c
index 135df53b1a..cdd3f54dd9 100644
--- a/chip/stm32/dma-stm32f4.c
+++ b/chip/stm32/dma-stm32f4.c
@@ -54,6 +54,13 @@ stm32_dma_stream_t *dma_get_channel(enum dma_channel stream)
return &dma->stream[stream % STM32_DMAS_COUNT];
}
+#ifdef CHIP_FAMILY_STM32H7
+void dma_select_channel(enum dma_channel channel, uint8_t req)
+{
+ STM2_DMAMUX_CxCR(DMAMUX1, channel) = req;
+}
+#endif
+
void dma_disable(enum dma_channel ch)
{
stm32_dma_stream_t *stream = dma_get_channel(ch);