Lines Matching +full:cbom +full:- +full:block +full:- +full:size
1 // SPDX-License-Identifier: GPL-2.0-only
3 * RISC-V specific functions to support DMA for non-coherent devices
8 #include <linux/dma-direct.h>
9 #include <linux/dma-map-ops.h>
15 void arch_sync_dma_for_device(phys_addr_t paddr, size_t size, in arch_sync_dma_for_device() argument
22 ALT_CMO_OP(clean, vaddr, size, riscv_cbom_block_size); in arch_sync_dma_for_device()
25 ALT_CMO_OP(clean, vaddr, size, riscv_cbom_block_size); in arch_sync_dma_for_device()
28 ALT_CMO_OP(flush, vaddr, size, riscv_cbom_block_size); in arch_sync_dma_for_device()
35 void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size, in arch_sync_dma_for_cpu() argument
45 ALT_CMO_OP(flush, vaddr, size, riscv_cbom_block_size); in arch_sync_dma_for_cpu()
52 void arch_dma_prep_coherent(struct page *page, size_t size) in arch_dma_prep_coherent() argument
56 ALT_CMO_OP(flush, flush_addr, size, riscv_cbom_block_size); in arch_dma_prep_coherent()
59 void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, in arch_setup_dma_ops() argument
64 "%s %s: ARCH_DMA_MINALIGN smaller than riscv,cbom-block-size (%d < %d)", in arch_setup_dma_ops()
69 "%s %s: device non-coherent but no non-coherent operations supported", in arch_setup_dma_ops()
72 dev->dma_coherent = coherent; in arch_setup_dma_ops()
78 "Non-coherent DMA support enabled without a block size\n"); in riscv_noncoherent_supported()