1 /* SPDX-License-Identifier: GPL-2.0+ */
6 #include <linux/compiler.h>
7 #include <linux/types.h>
10 #ifndef CONFIG_HAVE_ARCH_IOMAP
11 static inline u8 ioread8(const volatile void __iomem *addr)
16 static inline u16 ioread16(const volatile void __iomem *addr)
21 static inline u32 ioread32(const volatile void __iomem *addr)
25 #endif /* !CONFIG_HAVE_ARCH_IOMAP */
28 static inline u64 ioread64(const volatile void __iomem *addr)
32 #endif /* CONFIG_64BIT */
34 #ifndef CONFIG_HAVE_ARCH_IOMAP
35 static inline void iowrite8(u8 value, volatile void __iomem *addr)
40 static inline void iowrite16(u16 value, volatile void __iomem *addr)
45 static inline void iowrite32(u32 value, volatile void __iomem *addr)
49 #endif /* !CONFIG_HAVE_ARCH_IOMAP */
52 static inline void iowrite64(u64 value, volatile void __iomem *addr)
56 #endif /* CONFIG_64BIT */
58 #ifndef CONFIG_HAVE_ARCH_IOREMAP
59 static inline void __iomem *ioremap(resource_size_t offset,
62 return (void __iomem *)(unsigned long)offset;
65 static inline void iounmap(void __iomem *addr)
70 #define devm_ioremap(dev, offset, size) ioremap(offset, size)
72 #endif /* _LINUX_IO_H */