summaryrefslogtreecommitdiffstats
path: root/arch/nds32/kernel/dma.c
Commit message (Collapse)AuthorAgeFilesLines
* dma-mapping: drop the dev argument to arch_sync_dma_for_*Christoph Hellwig2019-11-201-4/+4
| | | | | | | | These are pure cache maintainance routines, so drop the unused struct device argument. Signed-off-by: Christoph Hellwig <hch@lst.de> Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* dma-mapping: make dma_atomic_pool_init self-containedChristoph Hellwig2019-08-291-6/+0
| | | | | | | | | | The memory allocated for the atomic pool needs to have the same mapping attributes that we use for remapping, so use pgprot_dmacoherent instead of open coding it. Also deduct a suitable zone to allocate the memory from based on the presence of the DMA zones. Signed-off-by: Christoph Hellwig <hch@lst.de>
* nds32: use the generic remapping allocator for coherent DMA allocationsChristoph Hellwig2019-06-251-314/+11
| | | | | | | | | | | Replace the code that sets up uncached PTEs with the generic vmap based remapping code. It also provides an atomic pool for allocations from non-blocking context, which we not properly supported by the existing nds32 code. Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Greentime Hu <greentime@andestech.com> Reviewed-by: Greentime Hu <greentime@andestech.com>
* nds32: use generic dma_noncoherent_opsChristoph Hellwig2018-05-291-102/+11
| | | | | | | | Switch to the generic noncoherent direct mapping implementation. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Greentime Hu <greentime@andestech.com> Tested-by: Greentime Hu <greentime@andestech.com>
* nds32: implement the unmap_sg DMA operationChristoph Hellwig2018-05-291-0/+6
| | | | | | | | | | This matches the implementation of the more commonly used unmap_single routines and the sync_sg_for_cpu method which should provide equivalent cache maintainance. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Greentime Hu <greentime@andestech.com> Tested-by: Greentime Hu <greentime@andestech.com>
* nds32: consolidate DMA cache maintainance routinesChristoph Hellwig2018-05-291-94/+93
| | | | | | | | | | | | | Make sure all other DMA methods call nds32_dma_sync_single_for_{device,cpu} to perform cache maintaince, and remove the consisteny_sync helper that implemented both with entirely separate code based off an argument. Also make sure these helpers handled highmem properly, for which code is copy and pasted from mips. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Greentime Hu <greentime@andestech.com> Tested-by: Greentime Hu <greentime@andestech.com>
* nds32: DMA mapping APIGreentime Hu2018-02-221-0/+477
This patch adds support for the DMA mapping API. It uses dma_map_ops for flexibility. Signed-off-by: Vincent Chen <vincentc@andestech.com> Signed-off-by: Greentime Hu <greentime@andestech.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
OpenPOWER on IntegriCloud