summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 440d9a4)
raw | patch | inline | side by side (parent: 440d9a4)
author | Bin Meng <bmeng.cn@gmail.com> | |
Mon, 15 Oct 2018 09:21:15 +0000 (02:21 -0700) | ||
committer | Simon Glass <sjg@chromium.org> | |
Wed, 14 Nov 2018 17:16:27 +0000 (09:16 -0800) |
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>
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>
include/linux/io.h | patch | blob | history | |
lib/Kconfig | patch | blob | history |
diff --git a/include/linux/io.h b/include/linux/io.h
index d1b3efed9daa77b952e4edca0897d79b0eb68cc3..9badab49b0bdb25fca8ce038b1beba9d3b9af1d8 100644 (file)
--- a/include/linux/io.h
+++ b/include/linux/io.h
#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);
{
return readl(addr);
}
+#endif /* !CONFIG_HAVE_ARCH_IOMAP */
#ifdef CONFIG_64BIT
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);
{
writel(value, addr);
}
+#endif /* !CONFIG_HAVE_ARCH_IOMAP */
#ifdef CONFIG_64BIT
static inline void iowrite64(u64 value, volatile void __iomem *addr)
diff --git a/lib/Kconfig b/lib/Kconfig
index ccab426e12189299f4611d413b3ce7b0c4bf8a6e..847e797a3a4f7c1e0e7048829d38ccf1bd909997 100644 (file)
--- a/lib/Kconfig
+++ b/lib/Kconfig
Enable this option to calculate entries for CRC tables at runtime.
This can be helpful when reducing the size of the build image
+config HAVE_ARCH_IOMAP
+ bool
+ help
+ Enable this option if architecture provides io{read,write}{8,16,32}
+ I/O accessor functions.
+
config HAVE_PRIVATE_LIBGCC
bool