blob: 29c7a7bb7080583447dd4f16cfabed94ba87056d [file] [log] [blame]
Álvaro Fernández Rojas3604b452016-04-09 12:56:47 +02001#ifndef __ASM_MACH_BMIPS_IOREMAP_H
2#define __ASM_MACH_BMIPS_IOREMAP_H
3
4#include <linux/types.h>
5
6static inline phys_addr_t fixup_bigphys_addr(phys_addr_t phys_addr, phys_addr_t size)
7{
8 return phys_addr;
9}
10
11static inline int is_bmips_internal_registers(phys_addr_t offset)
12{
13 if (offset >= 0xfff80000)
14 return 1;
15
16 return 0;
17}
18
19static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size,
20 unsigned long flags)
21{
22 if (is_bmips_internal_registers(offset))
23 return (void __iomem *)offset;
24
25 return NULL;
26}
27
28static inline int plat_iounmap(const volatile void __iomem *addr)
29{
30 return is_bmips_internal_registers((unsigned long)addr);
31}
32
33#endif /* __ASM_MACH_BMIPS_IOREMAP_H */