summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/ioport.c
diff options
context:
space:
mode:
authorGreentime Hu <greentime@andestech.com>2017-11-22 11:57:46 +0100
committerGreentime Hu <greentime@andestech.com>2018-02-22 03:44:30 +0100
commitb3ada9d0ce8d286c8bbbb02fdbddec5036242b42 (patch)
treef459bc321749a4a902343c7bbdb4b8854059779e /arch/sparc/kernel/ioport.c
parentxtensa: add ioremap_nocache declaration before include asm-generic/io.h. (diff)
downloadlinux-b3ada9d0ce8d286c8bbbb02fdbddec5036242b42.tar.xz
linux-b3ada9d0ce8d286c8bbbb02fdbddec5036242b42.zip
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 'arch/sparc/kernel/ioport.c')
-rw-r--r--arch/sparc/kernel/ioport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 7eeef80c02f7..3bcef9ce74df 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -122,12 +122,12 @@ static void xres_free(struct xresource *xrp) {
*
* Bus type is always zero on IIep.
*/
-void __iomem *ioremap(unsigned long offset, unsigned long size)
+void __iomem *ioremap(phys_addr_t offset, size_t size)
{
char name[14];
sprintf(name, "phys_%08x", (u32)offset);
- return _sparc_alloc_io(0, offset, size, name);
+ return _sparc_alloc_io(0, (unsigned long)offset, size, name);
}
EXPORT_SYMBOL(ioremap);