-
Notifications
You must be signed in to change notification settings - Fork 8.4k
drivers: dma: si32: Improve enabling, disabling and configuration of DMA channels #79953
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
drivers: dma: si32: Improve enabling, disabling and configuration of DMA channels #79953
Conversation
035dfc9 to
1c84afb
Compare
1c84afb to
531a9c3
Compare
531a9c3 to
8e3d578
Compare
drivers/dma/dma_si32.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the channel is not stopped this would be an error. See the DMA state diagrams https://docs.zephyrproject.org/latest/hardware/peripherals/dma.html#channel-state-machine-expectations
Let me know if something is unclear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, feeling silly now. Need to rework this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pushed an improved version.
Regarding the documentation: It seem to me as if is missing the transition from Configured to Configured by using dma_config. Would create a PR for this if true. #80206
As per dma_stop() documentation, the implementation has to not just stop the transfer, but also to disable the channel. Before this commit, only the transfer has been stopped. Same goes for dma_start(). This also allows the enabling of a channel to be removed from dma_si32_config(). Signed-off-by: Reto Schneider <[email protected]>
8e3d578 to
bf7cf51
Compare
|
@rettichschnidi do you actually need the "reorder function definitions" commit anymore? |
As per Zephyr DMA documentation, dma_config() must not be done on a running channel. Signed-off-by: Reto Schneider <[email protected]>
bf7cf51 to
4c82250
Compare
Gone |
This improves adherence to documented behavior and makes it harder to use the driver wrongly.