summaryrefslogtreecommitdiff
path: root/arch/mips/loongson64/common
diff options
context:
space:
mode:
authorHuacai Chen <chenhc@lemote.com>2018-08-23 13:33:10 +0800
committerPaul Burton <paul.burton@mips.com>2018-08-28 09:47:14 -0700
commit33f2ac5451a62f4e441454522b0588790144a717 (patch)
tree1f04758c19f6909e1031703cbbc88704518eb815 /arch/mips/loongson64/common
parent5b394b2ddf0347bef56e50c69a58773c94343ff3 (diff)
MIPS: Loongon64: DMA functions cleanup
Split the common dma.c which shared by Loongson-2E and Loongson-2F, since the code in 'common' directory is assumed be shared by all 64bit Loongson platforms (but Loongson-3 doesn't use it now). By the way, Loongson-2E and Loongson-2F have already dropped 32bit kernel support, so CONFIG_64BIT isn't needed. Signed-off-by: Huacai Chen <chenhc@lemote.com> Signed-off-by: Paul Burton <paul.burton@mips.com> Patchwork: https://patchwork.linux-mips.org/patch/20302/ Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Cc: Huacai Chen <chenhuacai@gmail.com>
Diffstat (limited to 'arch/mips/loongson64/common')
-rw-r--r--arch/mips/loongson64/common/Makefile1
-rw-r--r--arch/mips/loongson64/common/dma.c18
2 files changed, 0 insertions, 19 deletions
diff --git a/arch/mips/loongson64/common/Makefile b/arch/mips/loongson64/common/Makefile
index 57ee03022941..684624f61f5a 100644
--- a/arch/mips/loongson64/common/Makefile
+++ b/arch/mips/loongson64/common/Makefile
@@ -6,7 +6,6 @@
obj-y += setup.o init.o cmdline.o env.o time.o reset.o irq.o \
bonito-irq.o mem.o machtype.o platform.o serial.o
obj-$(CONFIG_PCI) += pci.o
-obj-$(CONFIG_CPU_LOONGSON2) += dma.o
#
# Serial port support
diff --git a/arch/mips/loongson64/common/dma.c b/arch/mips/loongson64/common/dma.c
deleted file mode 100644
index 48f04126bde2..000000000000
--- a/arch/mips/loongson64/common/dma.c
+++ /dev/null
@@ -1,18 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/dma-direct.h>
-
-dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr)
-{
- return paddr | 0x80000000;
-}
-
-phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dma_addr)
-{
-#if defined(CONFIG_CPU_LOONGSON2F) && defined(CONFIG_64BIT)
- if (dma_addr > 0x8fffffff)
- return dma_addr;
- return dma_addr & 0x0fffffff;
-#else
- return dma_addr & 0x7fffffff;
-#endif
-}