diff options
author | Iru Cai <mytbk920423@gmail.com> | 2019-10-30 15:30:25 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2019-10-30 15:30:25 +0800 |
commit | 1de6c9a59765f804ba40ac69fb12220e43734115 (patch) | |
tree | b89b9cdae627a83e5fcefbeda958ebe96d0e39e6 | |
parent | 48a0dd2f45b7af6756af8a84b10c39d1a896f25a (diff) | |
download | uext4-1de6c9a59765f804ba40ac69fb12220e43734115.tar.xz |
kill dma-mapping.h
-rw-r--r-- | arch/arm/include/asm/dma-mapping.h | 36 | ||||
-rw-r--r-- | arch/nds32/include/asm/dma-mapping.h | 28 | ||||
-rw-r--r-- | arch/nios2/include/asm/dma-mapping.h | 24 | ||||
-rw-r--r-- | arch/riscv/include/asm/dma-mapping.h | 38 | ||||
-rw-r--r-- | arch/x86/include/asm/dma-mapping.h | 36 |
5 files changed, 0 insertions, 162 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h deleted file mode 100644 index fc5b8f6..0000000 --- a/arch/arm/include/asm/dma-mapping.h +++ /dev/null @@ -1,36 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2007 - * Stelian Pop <stelian@popies.net> - * Lead Tech Design <www.leadtechdesign.com> - */ -#ifndef __ASM_ARM_DMA_MAPPING_H -#define __ASM_ARM_DMA_MAPPING_H - -#include <linux/dma-direction.h> - -#define dma_mapping_error(x, y) 0 - -static inline void *dma_alloc_coherent(size_t len, unsigned long *handle) -{ - *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, ROUND(len, ARCH_DMA_MINALIGN)); - return (void *)*handle; -} - -static inline void dma_free_coherent(void *addr) -{ - free(addr); -} - -static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, - enum dma_data_direction dir) -{ - return (unsigned long)vaddr; -} - -static inline void dma_unmap_single(volatile void *vaddr, size_t len, - unsigned long paddr) -{ -} - -#endif /* __ASM_ARM_DMA_MAPPING_H */ diff --git a/arch/nds32/include/asm/dma-mapping.h b/arch/nds32/include/asm/dma-mapping.h deleted file mode 100644 index e6808dc..0000000 --- a/arch/nds32/include/asm/dma-mapping.h +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2013 Andes Technology Corporation - * Ken Kuo, Andes Technology Corporation <ken_kuo@andestech.com> - */ -#ifndef __ASM_NDS_DMA_MAPPING_H -#define __ASM_NDS_DMA_MAPPING_H - -#include <linux/dma-direction.h> - -static void *dma_alloc_coherent(size_t len, unsigned long *handle) -{ - *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len); - return (void *)*handle; -} - -static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, - enum dma_data_direction dir) -{ - return (unsigned long)vaddr; -} - -static inline void dma_unmap_single(volatile void *vaddr, size_t len, - unsigned long paddr) -{ -} - -#endif /* __ASM_NDS_DMA_MAPPING_H */ diff --git a/arch/nios2/include/asm/dma-mapping.h b/arch/nios2/include/asm/dma-mapping.h deleted file mode 100644 index 65f67bc..0000000 --- a/arch/nios2/include/asm/dma-mapping.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __ASM_NIOS2_DMA_MAPPING_H -#define __ASM_NIOS2_DMA_MAPPING_H - -#include <memalign.h> -#include <asm/io.h> - -/* - * dma_alloc_coherent() return cache-line aligned allocation which is mapped - * to uncached io region. - */ -static inline void *dma_alloc_coherent(size_t len, unsigned long *handle) -{ - unsigned long addr = (unsigned long)malloc_cache_aligned(len); - - if (!addr) - return NULL; - - invalidate_dcache_range(addr, addr + len); - if (handle) - *handle = addr; - - return map_physmem(addr, len, MAP_NOCACHE); -} -#endif /* __ASM_NIOS2_DMA_MAPPING_H */ diff --git a/arch/riscv/include/asm/dma-mapping.h b/arch/riscv/include/asm/dma-mapping.h deleted file mode 100644 index 3d930c9..0000000 --- a/arch/riscv/include/asm/dma-mapping.h +++ /dev/null @@ -1,38 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (c) 2018 Western Digital Corporation or its affiliates. - * - * Authors: - * Anup Patel <anup.patel@wdc.com> - */ - -#ifndef __ASM_RISCV_DMA_MAPPING_H -#define __ASM_RISCV_DMA_MAPPING_H - -#include <linux/dma-direction.h> - -#define dma_mapping_error(x, y) 0 - -static inline void *dma_alloc_coherent(size_t len, unsigned long *handle) -{ - *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len); - return (void *)*handle; -} - -static inline void dma_free_coherent(void *addr) -{ - free(addr); -} - -static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, - enum dma_data_direction dir) -{ - return (unsigned long)vaddr; -} - -static inline void dma_unmap_single(volatile void *vaddr, size_t len, - unsigned long paddr) -{ -} - -#endif /* __ASM_RISCV_DMA_MAPPING_H */ diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h deleted file mode 100644 index b353ff0..0000000 --- a/arch/x86/include/asm/dma-mapping.h +++ /dev/null @@ -1,36 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2007 - * Stelian Pop <stelian@popies.net> - * Lead Tech Design <www.leadtechdesign.com> - */ -#ifndef __ASM_X86_DMA_MAPPING_H -#define __ASM_X86_DMA_MAPPING_H - -#include <linux/dma-direction.h> - -#define dma_mapping_error(x, y) 0 - -static inline void *dma_alloc_coherent(size_t len, unsigned long *handle) -{ - *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len); - return (void *)*handle; -} - -static inline void dma_free_coherent(void *addr) -{ - free(addr); -} - -static inline unsigned long dma_map_single(volatile void *vaddr, size_t len, - enum dma_data_direction dir) -{ - return (unsigned long)vaddr; -} - -static inline void dma_unmap_single(volatile void *vaddr, size_t len, - unsigned long paddr) -{ -} - -#endif /* __ASM_X86_DMA_MAPPING_H */ |