1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-26 13:01:17 +02:00

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>
This commit is contained in:
Bin Meng
2018-10-15 02:21:15 -07:00
committed by Simon Glass
parent 440d9a47f7
commit 2895c4b7d6
2 changed files with 10 additions and 0 deletions

View File

@@ -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)