0001
0002 #ifndef __ASM_MACH_BMIPS_IOREMAP_H
0003 #define __ASM_MACH_BMIPS_IOREMAP_H
0004
0005 #include <linux/types.h>
0006
0007 static inline int is_bmips_internal_registers(phys_addr_t offset)
0008 {
0009 if (offset >= 0xfff80000)
0010 return 1;
0011
0012 return 0;
0013 }
0014
0015 static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size,
0016 unsigned long flags)
0017 {
0018 if (is_bmips_internal_registers(offset))
0019 return (void __iomem *)offset;
0020
0021 return NULL;
0022 }
0023
0024 static inline int plat_iounmap(const volatile void __iomem *addr)
0025 {
0026 return is_bmips_internal_registers((unsigned long)addr);
0027 }
0028
0029 #endif