Skip to content

Commit ba21de5

Browse files
nzmichaelhgalak
authored andcommitted
drivers: dma: Add SAM0 DMAC driver
This adds support for the SAM0 DMA Controller (DMAC). Chained transfer are not currently implemented. Tested with tests/drivers/dma/loop_transfer and custom modifications to that test using three parallel reloading channels. Also tested with a trivial program that did memory->serial. Signed-off-by: Michael Hope <[email protected]> [[email protected]: Rebased and updated commit message] Signed-off-by: Derek Hageman <[email protected]>
1 parent 5f347ee commit ba21de5

File tree

7 files changed

+478
-0
lines changed

7 files changed

+478
-0
lines changed

drivers/dma/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ zephyr_library_sources_ifdef(CONFIG_DMA_SAM_XDMAC dma_sam_xdmac.c)
77
zephyr_library_sources_ifdef(CONFIG_DMA_STM32F4X dma_stm32f4x.c)
88
zephyr_library_sources_ifdef(CONFIG_DMA_CAVS dma_cavs.c)
99
zephyr_library_sources_ifdef(CONFIG_DMA_NIOS2_MSGDMA dma_nios2_msgdma.c)
10+
zephyr_library_sources_ifdef(CONFIG_DMA_SAM0 dma_sam0.c)
1011
zephyr_library_sources_ifdef(CONFIG_USERSPACE dma_handlers.c)

drivers/dma/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,6 @@ source "drivers/dma/Kconfig.cavs"
6363

6464
source "drivers/dma/Kconfig.nios2_msgdma"
6565

66+
source "drivers/dma/Kconfig.sam0"
67+
6668
endif # DMA

drivers/dma/Kconfig.sam0

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Kconfig - Atmel SAM DMAC configuration options
2+
#
3+
# Copyright (c) 2018 Google LLC.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
menuconfig DMA_SAM0
7+
bool "Atmel SAM0 series DMAC driver"
8+
default y
9+
depends on SOC_FAMILY_SAM0
10+
help
11+
DMA driver for Atmel SAM0 series MCUs.

0 commit comments

Comments
 (0)