Skip to content

Conversation

@Sizurka
Copy link
Contributor

@Sizurka Sizurka commented Mar 24, 2019

This adds support for the SAM0 DMA Controller (DMAC).

This is a rebase and update of #6306 including implementing the new reload API and changes to support some of the updates to the DMAC found in SAME54.

Tested on SAMD21 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.

@benpicco: I have compile tested this against your SAME54 branch, but if you have a chance, let me know if it works!

@zephyrbot
Copy link

zephyrbot commented Mar 24, 2019

All checks are passing now.

Review history of this comment for details about previous failed status.
Note that some checks might have not completed yet.

@codecov-io
Copy link

codecov-io commented Mar 24, 2019

Codecov Report

Merging #14861 into master will decrease coverage by 0.31%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14861      +/-   ##
==========================================
- Coverage   52.83%   52.52%   -0.32%     
==========================================
  Files         310      309       -1     
  Lines       45324    45063     -261     
  Branches    10476    10434      -42     
==========================================
- Hits        23947    23669     -278     
+ Misses      16590    16583       -7     
- Partials     4787     4811      +24
Impacted Files Coverage Δ
include/spinlock.h 57.14% <0%> (-17.86%) ⬇️
kernel/mutex.c 83.82% <0%> (-13.28%) ⬇️
kernel/timeout.c 75.92% <0%> (-9.26%) ⬇️
kernel/include/kernel_structs.h 90.9% <0%> (-9.1%) ⬇️
kernel/sched.c 83.9% <0%> (-8.85%) ⬇️
include/misc/sflist.h 72.97% <0%> (-8.11%) ⬇️
include/misc/dlist.h 88.67% <0%> (-7.55%) ⬇️
kernel/sem.c 86.36% <0%> (-6.97%) ⬇️
subsys/net/ip/route.c 40.62% <0%> (-5.56%) ⬇️
kernel/thread.c 84.81% <0%> (-5.5%) ⬇️
... and 63 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c38df15...9fc4457. Read the comment docs.

@benpicco
Copy link
Contributor

Nice! I've just tried it on the SAME54 and it immediately worked (tests/drivers/dma/loop_transfer) after adding the dma node to the dts.

Copy link
Contributor

@galak galak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one minor change to add comment about where DMAC_CHID_ID is coming from and why we might be using it (assuming this varies on different SoC variants).

nzmichaelh and others added 2 commits May 2, 2019 16:11
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]>
Add myself as owner for the SAM0 DMA driver.

Signed-off-by: Derek Hageman <[email protected]>
@benpicco benpicco added the platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) label May 2, 2019
@galak galak merged commit e07e8b8 into zephyrproject-rtos:master May 3, 2019
@Sizurka Sizurka deleted the sam0-dma branch May 8, 2019 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: DMA Direct Memory Access area: Drivers platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants