aboutsummaryrefslogtreecommitdiff
path: root/include/linux/io.h
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2018-10-15 02:21:15 -0700
committerSimon Glass <sjg@chromium.org>2018-11-14 09:16:27 -0800
commit2895c4b7d65e1a65f7d8804126f91ee91e8e2481 (patch)
treef860e20b97f39bb6c64d85582866c3cdc60f8194 /include/linux/io.h
parent440d9a47f7ac442194685845ae2cca90e62cb0fd (diff)
downloadu-boot-2895c4b7d65e1a65f7d8804126f91ee91e8e2481.zip
u-boot-2895c4b7d65e1a65f7d8804126f91ee91e8e2481.tar.gz
u-boot-2895c4b7d65e1a65f7d8804126f91ee91e8e2481.tar.bz2
kconfig: Introduce HAVE_ARCH_IOMAP
Introduce a new Kconfig option for architecture codes to control whether it provides io{read,write}{8,16,32} I/O accessor functions. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/linux/io.h')
-rw-r--r--include/linux/io.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/io.h b/include/linux/io.h
index d1b3efe..9badab4 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -7,6 +7,7 @@
#include <linux/types.h>
#include <asm/io.h>
+#ifndef CONFIG_HAVE_ARCH_IOMAP
static inline u8 ioread8(const volatile void __iomem *addr)
{
return readb(addr);
@@ -21,6 +22,7 @@ static inline u32 ioread32(const volatile void __iomem *addr)
{
return readl(addr);
}
+#endif /* !CONFIG_HAVE_ARCH_IOMAP */
#ifdef CONFIG_64BIT
static inline u64 ioread64(const volatile void __iomem *addr)
@@ -29,6 +31,7 @@ static inline u64 ioread64(const volatile void __iomem *addr)
}
#endif /* CONFIG_64BIT */
+#ifndef CONFIG_HAVE_ARCH_IOMAP
static inline void iowrite8(u8 value, volatile void __iomem *addr)
{
writeb(value, addr);
@@ -43,6 +46,7 @@ static inline void iowrite32(u32 value, volatile void __iomem *addr)
{
writel(value, addr);
}
+#endif /* !CONFIG_HAVE_ARCH_IOMAP */
#ifdef CONFIG_64BIT
static inline void iowrite64(u64 value, volatile void __iomem *addr)