1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef RTL838X_IOREMAP_H_
3 #define RTL838X_IOREMAP_H_
5 static inline int is_rtl838x_internal_registers(phys_addr_t offset
)
8 if (offset
>= 0xb8000000 && offset
< 0xb9000000)
11 if (offset
>= 0xbb000000 && offset
< 0xbc000000)
16 static inline void __iomem
*plat_ioremap(phys_addr_t offset
, unsigned long size
,
19 if (is_rtl838x_internal_registers(offset
))
20 return (void __iomem
*)offset
;
24 static inline int plat_iounmap(const volatile void __iomem
*addr
)
26 return is_rtl838x_internal_registers((unsigned long)addr
);