diff options
author | Greentime Hu <greentime@andestech.com> | 2017-11-22 13:57:46 +0300 |
---|---|---|
committer | Greentime Hu <greentime@andestech.com> | 2018-02-22 05:44:30 +0300 |
commit | b3ada9d0ce8d286c8bbbb02fdbddec5036242b42 (patch) | |
tree | f459bc321749a4a902343c7bbdb4b8854059779e /include/asm-generic/io.h | |
parent | 94bc61ead46c3d9943bd35a4536e61d4ea9f1e66 (diff) | |
download | linux-b3ada9d0ce8d286c8bbbb02fdbddec5036242b42.tar.xz |
asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU
It allows some architectures to use this generic macro instead of
defining theirs.
sparc: io: To use the define of ioremap_[nocache|wc|wb] in asm-generic/io.h
It will move the ioremap_nocache out of the CONFIG_MMU ifdef. This means that
in order to suppress re-definition errors we need to remove the #define
in arch/sparc/include/asm/io_32.h. Also, the change adds a prototype for
ioremap where size is size_t and offset is phys_addr_t so fix that as well.
Signed-off-by: Greentime Hu <greentime@andestech.com>
Diffstat (limited to 'include/asm-generic/io.h')
-rw-r--r-- | include/asm-generic/io.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index b4531e3b2120..7c6a39e64749 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -852,7 +852,16 @@ static inline void __iomem *__ioremap(phys_addr_t offset, size_t size, } #endif +#ifndef iounmap +#define iounmap iounmap + +static inline void iounmap(void __iomem *addr) +{ +} +#endif +#endif /* CONFIG_MMU */ #ifndef ioremap_nocache +void __iomem *ioremap(phys_addr_t phys_addr, size_t size); #define ioremap_nocache ioremap_nocache static inline void __iomem *ioremap_nocache(phys_addr_t offset, size_t size) { @@ -884,15 +893,6 @@ static inline void __iomem *ioremap_wt(phys_addr_t offset, size_t size) } #endif -#ifndef iounmap -#define iounmap iounmap - -static inline void iounmap(void __iomem *addr) -{ -} -#endif -#endif /* CONFIG_MMU */ - #ifdef CONFIG_HAS_IOPORT_MAP #ifndef CONFIG_GENERIC_IOMAP #ifndef ioport_map |