Skip to content

drivers: dma: fix the WCH DMA transfer width #90924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 16, 2025

Conversation

nzmichaelh
Copy link
Collaborator

The driver treats the source_data_size and dest_data_size as a
width in bits and converts 8 bits to 1, 16 bits to 2, and 32 bits to 3.

This should be a width in bytes with 1 byte mapping to 0, 2 bytes to
1, and 4 bytes to 3.

Note that this preserves the current behaviour of silently accepting
invalid transfer bit widths.

@nzmichaelh nzmichaelh force-pushed the fix-dma-width branch 2 times, most recently from b092e81 to b52f49d Compare June 2, 2025 18:15
@nzmichaelh nzmichaelh marked this pull request as ready for review June 2, 2025 18:16
@nzmichaelh nzmichaelh requested a review from VynDragon June 2, 2025 18:16
@github-actions github-actions bot requested a review from teburd June 2, 2025 18:17
This adds `tests/drivers/dma/chan_blen_transfer` and
`tests/drivers/dma/loop_transfer` as build tests to any manual Twister
run.

Signed-off-by: Michael Hope <[email protected]>
The driver treats the `source_data_size` and `dest_data_size` as a
width in bits and converts 8 bits to 1, 16 bits to 2, and 32 bits to 3.

This should be a width in bytes with 1 byte mapping to 0, 2 bytes to
1, and 4 bytes to 3.

Note that this preserves the current behaviour of silently accepting
invalid transfer bit widths.

Signed-off-by: Michael Hope <[email protected]>
@nzmichaelh
Copy link
Collaborator Author

Rebased to fix the unrelated CI failure.

Copy link

sonarqubecloud bot commented Jun 9, 2025

@danieldegrasse danieldegrasse merged commit c37abf1 into zephyrproject-rtos:main Jun 16, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants