]> git.ipfire.org Git - thirdparty/linux.git/commit
rust: dma: add DMA addressing capabilities
authorDanilo Krummrich <dakr@kernel.org>
Wed, 16 Jul 2025 15:02:47 +0000 (17:02 +0200)
committerDanilo Krummrich <dakr@kernel.org>
Sat, 19 Jul 2025 17:36:51 +0000 (19:36 +0200)
commit101d66828a4eefb89b72256155feb6ec9abc144a
tree16a134f9a4eb29f60a7fb4cb3cefcf4de49c4f3c
parentd06d5f66f5494e29c1520583eac8382f0ab5f8a7
rust: dma: add DMA addressing capabilities

Implement `dma_set_mask()`, `dma_set_coherent_mask()` and
`dma_set_mask_and_coherent()` in the `dma::Device` trait.

Those methods are used to set up the device's DMA addressing
capabilities.

Reviewed-by: Abdiel Janulgue <abdiel.janulgue@gmail.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250716150354.51081-3-dakr@kernel.org
[ Add DmaMask::try_new(). - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/helpers/dma.c
rust/kernel/dma.rs