summaryrefslogtreecommitdiff
path: root/arch/mips/loongson2ef/fuloong-2e/dma.c
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2019-10-20 17:43:14 +0300
committerPaul Burton <paulburton@kernel.org>2019-11-02 00:30:52 +0300
commit71e2f4dd5a65bd8dbca0b77661e75eea471168f8 (patch)
treee7107d2996f7ba8ec282190a49c557598acd6f88 /arch/mips/loongson2ef/fuloong-2e/dma.c
parent268a2d60013049cfd9a0aada77284aa6ea8ad26a (diff)
downloadlinux-71e2f4dd5a65bd8dbca0b77661e75eea471168f8.tar.xz
MIPS: Fork loongson2ef from loongson64
As later model of GSx64 family processors including 2-series-soc have similar design with initial loongson3a while loongson2e/f seems less identical, we separate loongson2e/f support code out of mach-loongson64 to make our life easier. This patch contains mostly file moving works. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> [paulburton@kernel.org: Squash in the MAINTAINERS updates] Signed-off-by: Paul Burton <paulburton@kernel.org> Cc: linux-mips@vger.kernel.org Cc: paul.burton@mips.com
Diffstat (limited to 'arch/mips/loongson2ef/fuloong-2e/dma.c')
-rw-r--r--arch/mips/loongson2ef/fuloong-2e/dma.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/loongson2ef/fuloong-2e/dma.c b/arch/mips/loongson2ef/fuloong-2e/dma.c
new file mode 100644
index 000000000000..e122292bf666
--- /dev/null
+++ b/arch/mips/loongson2ef/fuloong-2e/dma.c
@@ -0,0 +1,12 @@
+// 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)
+{
+ return dma_addr & 0x7fffffff;
+}