summaryrefslogtreecommitdiffstats
path: root/arch/mips/loongson2ef/fuloong-2e/dma.c
diff options
context:
space:
mode:
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 000000000..cea167d8a
--- /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;
+}