arch/arm64/bcm2711: DMA driver implementation - #19815
Draft
linguini1 wants to merge 1 commit into
Draft
Conversation
This commit introduces support for the BCM2711's 16 DMA channels, including the 4 DMA Lite and 4 DMA4 channels. It uses the NuttX DMA standard upper-half for compatibility with other drivers. The intention is for the majority of these channels to be used internally by other BCM2711 peripheral drivers. As such, each peripheral should be allocated an appropriate channel for its exclusive use (i.e. DMA4 channels for intensive peripherals like EMMC, frame buffer and networking, DMA Lite for low-data peripherals like a UART console).
Contributor
Author
|
Workflows cancelled since this is very much a WIP. |
acassis
reviewed
Aug 12, 2026
| */ | ||
|
|
||
| #define BCM_DMA(n) (BCM_DMA0_BASE + 0x100 * (n)) | ||
| #define BCM_DMA15 (BCM_DMA15_BASE) |
Contributor
There was a problem hiding this comment.
@linguini1 why to create a separated BCM_DMA15? Can't BCM_DMA(15) be used?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE
This PR is a WIP. I am opening it as a draft because:
It looks like I had discovered this a while ago on #8773 but never heard back from the author. If anyone has used this DMA driver, or anyone at Xiaomi might be willing to document it/provide a test application to verify correctness of my driver that would be awesome!
Summary
This commit introduces support for the BCM2711's 16 DMA channels, including the 4 DMA Lite and 4 DMA4 channels. It uses the NuttX DMA standard upper-half for compatibility with other drivers. The intention is for the majority of these channels to be used internally by other BCM2711 peripheral drivers. As such, each peripheral should be allocated an appropriate channel for its exclusive use (i.e. DMA4 channels for intensive peripherals like EMMC, frame buffer and networking, DMA Lite for low-data peripherals like a UART console).
Impact
Pre-cursor to a network driver (#16953) for the RPi4B Ethernet, which is the last milestone for my GSoC contract #18507.
Full support for DMA interfaces which should provide a large speedup for all
peripherals who later integrate this approach.
Testing
N/A, this is still a draft.