diff options
author | David S. Miller <davem@davemloft.net> | 2006-06-29 23:35:33 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-30 01:37:16 +0200 |
commit | 3ca9fab410fbef6fc3a13284f5c26faccade21d1 (patch) | |
tree | 91b4c38077db397bec0ff85f1c89c9f869b3970f /arch/sparc/kernel | |
parent | [SPARC]: Encode I/O space into resource flags on sparc32. (diff) | |
download | linux-3ca9fab410fbef6fc3a13284f5c26faccade21d1.tar.xz linux-3ca9fab410fbef6fc3a13284f5c26faccade21d1.zip |
[SPARC]: Add of_io{remap,unmap}().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/ioport.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 79d177149fdb..8654b446ac9e 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c @@ -26,6 +26,7 @@ */ #include <linux/config.h> +#include <linux/module.h> #include <linux/sched.h> #include <linux/kernel.h> #include <linux/errno.h> @@ -40,6 +41,7 @@ #include <asm/vaddrs.h> #include <asm/oplib.h> #include <asm/prom.h> +#include <asm/of_device.h> #include <asm/sbus.h> #include <asm/page.h> #include <asm/pgalloc.h> @@ -143,6 +145,21 @@ void __iomem *sbus_ioremap(struct resource *phyres, unsigned long offset, phyres->start + offset, size, name); } +void __iomem *of_ioremap(struct resource *res, unsigned long offset, + unsigned long size, char *name) +{ + return _sparc_alloc_io(res->flags & 0xF, + res->start + offset, + size, name); +} +EXPORT_SYMBOL(of_ioremap); + +void of_iounmap(void __iomem *base, unsigned long size) +{ + iounmap(base); +} +EXPORT_SYMBOL(of_iounmap); + /* */ void sbus_iounmap(volatile void __iomem *addr, unsigned long size) |