1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef BCM63XX_IOREMAP_H_
3 #define BCM63XX_IOREMAP_H_
5 #include <bcm63xx_cpu.h>
7 static inline int is_bcm63xx_internal_registers(phys_addr_t offset
)
9 switch (bcm63xx_get_cpu_id()) {
11 if (offset
>= 0xfff80000)
18 if (offset
>= 0xfff00000)
24 if (offset
>= 0xb0000000 && offset
< 0xb1000000)
31 static inline void __iomem
*plat_ioremap(phys_addr_t offset
, unsigned long size
,
34 if (is_bcm63xx_internal_registers(offset
))
35 return (void __iomem
*)offset
;
39 static inline int plat_iounmap(const volatile void __iomem
*addr
)
41 return is_bcm63xx_internal_registers((unsigned long)addr
);
44 #endif /* BCM63XX_IOREMAP_H_ */