drm/rockchip: vop2: Fix the windows switch between different layers
[drm/drm-misc.git] / arch / mips / include / asm / mach-bmips / ioremap.h
blob63b4af9916b60440fa65be7108217f97f57796a0
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 int is_bmips_internal_registers(phys_addr_t offset)
9 if (offset >= 0xfff80000)
10 return 1;
12 return 0;
15 static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size,
16 unsigned long flags)
18 if (is_bmips_internal_registers(offset))
19 return (void __iomem *)offset;
21 return NULL;
24 static inline int plat_iounmap(const volatile void __iomem *addr)
26 return is_bmips_internal_registers((unsigned long)addr);
29 #endif /* __ASM_MACH_BMIPS_IOREMAP_H */