aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreentime Hu <greentime@andestech.com>2017-12-22 09:18:40 -0500
committerGreentime Hu <greentime@andestech.com>2018-02-21 21:44:30 -0500
commitb934e8eb483354bbadf1eee0a54e9487f50d6c5b (patch)
tree0aa564fe5add49eff22fc19feb898015534c142d
parent7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (diff)
openrisc: add ioremap_nocache declaration before include asm-generic/io.h and sync ioremap prototype with it.
A future commit for the nds32 architecture bootstrap("asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU") will move the ioremap_nocache out of the CONFIG_MMU ifdef. This means that in order to suppress re-definition errors we need to setup #define's before importing asm-generic/io.h. Also, the change adds a prototype for ioremap where size is size_t so fix that as well. Signed-off-by: Greentime Hu <greentime@andestech.com> Acked-by: Stafford Horne <shorne@gmail.com>
-rw-r--r--arch/openrisc/include/asm/io.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/openrisc/include/asm/io.h b/arch/openrisc/include/asm/io.h
index 7c691399da3f..6709b28a0221 100644
--- a/arch/openrisc/include/asm/io.h
+++ b/arch/openrisc/include/asm/io.h
@@ -29,13 +29,14 @@
29#define PIO_OFFSET 0 29#define PIO_OFFSET 0
30#define PIO_MASK 0 30#define PIO_MASK 0
31 31
32#define ioremap_nocache ioremap_nocache
32#include <asm-generic/io.h> 33#include <asm-generic/io.h>
33#include <asm/pgtable.h> 34#include <asm/pgtable.h>
34 35
35extern void __iomem *__ioremap(phys_addr_t offset, unsigned long size, 36extern void __iomem *__ioremap(phys_addr_t offset, unsigned long size,
36 pgprot_t prot); 37 pgprot_t prot);
37 38
38static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size) 39static inline void __iomem *ioremap(phys_addr_t offset, size_t size)
39{ 40{
40 return __ioremap(offset, size, PAGE_KERNEL); 41 return __ioremap(offset, size, PAGE_KERNEL);
41} 42}