summaryrefslogtreecommitdiff
path: root/arch/mips/loongson2ef/lemote-2f/dma.c
blob: abf0e39d7e469618b7c1d9b6f84bb46803a7b8cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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;
}