diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2019-10-20 22:43:14 +0800 |
---|---|---|
committer | Paul Burton <paulburton@kernel.org> | 2019-11-01 14:30:52 -0700 |
commit | 71e2f4dd5a65bd8dbca0b77661e75eea471168f8 (patch) | |
tree | e7107d2996f7ba8ec282190a49c557598acd6f88 /arch/mips/loongson2ef/lemote-2f/dma.c | |
parent | MIPS: Loongson64: Rename CPU TYPES (diff) | |
download | linux-dev-71e2f4dd5a65bd8dbca0b77661e75eea471168f8.tar.xz linux-dev-71e2f4dd5a65bd8dbca0b77661e75eea471168f8.zip |
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/lemote-2f/dma.c')
-rw-r--r-- | arch/mips/loongson2ef/lemote-2f/dma.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/mips/loongson2ef/lemote-2f/dma.c b/arch/mips/loongson2ef/lemote-2f/dma.c new file mode 100644 index 000000000000..abf0e39d7e46 --- /dev/null +++ b/arch/mips/loongson2ef/lemote-2f/dma.c @@ -0,0 +1,14 @@ +// 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 (dma_addr > 0x8fffffff) + return dma_addr; + return dma_addr & 0x0fffffff; +} |