1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef RTL838X_IOREMAP_H_
3 #define RTL838X_IOREMAP_H_
5 static inline phys_addr_t
fixup_bigphys_addr(phys_addr_t phys_addr
, phys_addr_t size
)
10 static inline int is_rtl838x_internal_registers(phys_addr_t offset
)
13 if (offset
>= 0xb8000000 && offset
< 0xb9000000)
16 if (offset
>= 0xbb000000 && offset
< 0xbc000000)
21 static inline void __iomem
*plat_ioremap(phys_addr_t offset
, unsigned long size
,
24 if (is_rtl838x_internal_registers(offset
))
25 return (void __iomem
*)offset
;
29 static inline int plat_iounmap(const volatile void __iomem
*addr
)
31 return is_rtl838x_internal_registers((unsigned long)addr
);