diff options
author | David S. Miller <davem@davemloft.net> | 2006-06-29 17:35:33 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-29 19:37:16 -0400 |
commit | 3ca9fab410fbef6fc3a13284f5c26faccade21d1 (patch) | |
tree | 91b4c38077db397bec0ff85f1c89c9f869b3970f /arch/sparc/kernel/ioport.c | |
parent | 95714e12dfb4794ee120f058fdf763e61baaad82 (diff) |
[SPARC]: Add of_io{remap,unmap}().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/ioport.c')
-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 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | 28 | #include <linux/config.h> |
29 | #include <linux/module.h> | ||
29 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
30 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
31 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
@@ -40,6 +41,7 @@ | |||
40 | #include <asm/vaddrs.h> | 41 | #include <asm/vaddrs.h> |
41 | #include <asm/oplib.h> | 42 | #include <asm/oplib.h> |
42 | #include <asm/prom.h> | 43 | #include <asm/prom.h> |
44 | #include <asm/of_device.h> | ||
43 | #include <asm/sbus.h> | 45 | #include <asm/sbus.h> |
44 | #include <asm/page.h> | 46 | #include <asm/page.h> |
45 | #include <asm/pgalloc.h> | 47 | #include <asm/pgalloc.h> |
@@ -143,6 +145,21 @@ void __iomem *sbus_ioremap(struct resource *phyres, unsigned long offset, | |||
143 | phyres->start + offset, size, name); | 145 | phyres->start + offset, size, name); |
144 | } | 146 | } |
145 | 147 | ||
148 | void __iomem *of_ioremap(struct resource *res, unsigned long offset, | ||
149 | unsigned long size, char *name) | ||
150 | { | ||
151 | return _sparc_alloc_io(res->flags & 0xF, | ||
152 | res->start + offset, | ||
153 | size, name); | ||
154 | } | ||
155 | EXPORT_SYMBOL(of_ioremap); | ||
156 | |||
157 | void of_iounmap(void __iomem *base, unsigned long size) | ||
158 | { | ||
159 | iounmap(base); | ||
160 | } | ||
161 | EXPORT_SYMBOL(of_iounmap); | ||
162 | |||
146 | /* | 163 | /* |
147 | */ | 164 | */ |
148 | void sbus_iounmap(volatile void __iomem *addr, unsigned long size) | 165 | void sbus_iounmap(volatile void __iomem *addr, unsigned long size) |