Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / mips / include / asm / mach-bmips / ioremap.h
blob52632ebc705f6fa73179a964062e09269729d388
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_MACH_BMIPS_IOREMAP_H
3 #define __ASM_MACH_BMIPS_IOREMAP_H
5 #include <linux/types.h>
7 static inline phys_addr_t fixup_bigphys_addr(phys_addr_t phys_addr, phys_addr_t size)
9 return phys_addr;
12 static inline int is_bmips_internal_registers(phys_addr_t offset)
14 if (offset >= 0xfff80000)
15 return 1;
17 return 0;
20 static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size,
21 unsigned long flags)
23 if (is_bmips_internal_registers(offset))
24 return (void __iomem *)offset;
26 return NULL;
29 static inline int plat_iounmap(const volatile void __iomem *addr)
31 return is_bmips_internal_registers((unsigned long)addr);
34 #endif /* __ASM_MACH_BMIPS_IOREMAP_H */