aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-27 07:05:35 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-29 05:15:13 -0400
commit454eeb2dd7bd0418451ea33a606d0fa50aa36718 (patch)
treeb03b762b590343c1c90e83efbec3819c32a95bfb /arch/sparc/kernel
parent98261dd1a393777f4400d8ad5a29e97cb30e5422 (diff)
sparc: Convert remaining sbus_ioremap() and sbus_iounmap() users.
Use of_ioremap() and of_iounmap() instead. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/auxio.c6
-rw-r--r--arch/sparc/kernel/sun4c_irq.c5
-rw-r--r--arch/sparc/kernel/sun4d_irq.c5
-rw-r--r--arch/sparc/kernel/sun4m_irq.c11
-rw-r--r--arch/sparc/kernel/time.c5
5 files changed, 19 insertions, 13 deletions
diff --git a/arch/sparc/kernel/auxio.c b/arch/sparc/kernel/auxio.c
index baf4ed3fb0f3..09c857215a52 100644
--- a/arch/sparc/kernel/auxio.c
+++ b/arch/sparc/kernel/auxio.c
@@ -6,6 +6,8 @@
6#include <linux/stddef.h> 6#include <linux/stddef.h>
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/spinlock.h> 8#include <linux/spinlock.h>
9#include <linux/of.h>
10#include <linux/of_device.h>
9#include <asm/oplib.h> 11#include <asm/oplib.h>
10#include <asm/io.h> 12#include <asm/io.h>
11#include <asm/auxio.h> 13#include <asm/auxio.h>
@@ -59,7 +61,7 @@ void __init auxio_probe(void)
59 r.flags = auxregs[0].which_io & 0xF; 61 r.flags = auxregs[0].which_io & 0xF;
60 r.start = auxregs[0].phys_addr; 62 r.start = auxregs[0].phys_addr;
61 r.end = auxregs[0].phys_addr + auxregs[0].reg_size - 1; 63 r.end = auxregs[0].phys_addr + auxregs[0].reg_size - 1;
62 auxio_register = sbus_ioremap(&r, 0, auxregs[0].reg_size, "auxio"); 64 auxio_register = of_ioremap(&r, 0, auxregs[0].reg_size, "auxio");
63 /* Fix the address on sun4m and sun4c. */ 65 /* Fix the address on sun4m and sun4c. */
64 if((((unsigned long) auxregs[0].phys_addr) & 3) == 3 || 66 if((((unsigned long) auxregs[0].phys_addr) & 3) == 3 ||
65 sparc_cpu_model == sun4c) 67 sparc_cpu_model == sun4c)
@@ -128,7 +130,7 @@ void __init auxio_power_probe(void)
128 r.flags = regs.which_io & 0xF; 130 r.flags = regs.which_io & 0xF;
129 r.start = regs.phys_addr; 131 r.start = regs.phys_addr;
130 r.end = regs.phys_addr + regs.reg_size - 1; 132 r.end = regs.phys_addr + regs.reg_size - 1;
131 auxio_power_register = (unsigned char *) sbus_ioremap(&r, 0, 133 auxio_power_register = (unsigned char *) of_ioremap(&r, 0,
132 regs.reg_size, "auxpower"); 134 regs.reg_size, "auxpower");
133 135
134 /* Display a quick message on the console. */ 136 /* Display a quick message on the console. */
diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c
index a5a32a0b10d1..a74582455cce 100644
--- a/arch/sparc/kernel/sun4c_irq.c
+++ b/arch/sparc/kernel/sun4c_irq.c
@@ -18,6 +18,8 @@
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/of.h>
22#include <linux/of_device.h>
21#include "irq.h" 23#include "irq.h"
22 24
23#include <asm/ptrace.h> 25#include <asm/ptrace.h>
@@ -34,7 +36,6 @@
34#include <asm/sun4paddr.h> 36#include <asm/sun4paddr.h>
35#include <asm/idprom.h> 37#include <asm/idprom.h>
36#include <asm/machines.h> 38#include <asm/machines.h>
37#include <asm/sbus.h>
38 39
39#if 0 40#if 0
40static struct resource sun4c_timer_eb = { "sun4c_timer" }; 41static struct resource sun4c_timer_eb = { "sun4c_timer" };
@@ -224,7 +225,7 @@ void __init sun4c_init_IRQ(void)
224 memset(&phyres, 0, sizeof(struct resource)); 225 memset(&phyres, 0, sizeof(struct resource));
225 phyres.flags = int_regs[0].which_io; 226 phyres.flags = int_regs[0].which_io;
226 phyres.start = int_regs[0].phys_addr; 227 phyres.start = int_regs[0].phys_addr;
227 interrupt_enable = (char *) sbus_ioremap(&phyres, 0, 228 interrupt_enable = (char *) of_ioremap(&phyres, 0,
228 int_regs[0].reg_size, "sun4c_intr"); 229 int_regs[0].reg_size, "sun4c_intr");
229 } 230 }
230 } 231 }
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index acfb447c00d0..c4a2bfb750a4 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -19,6 +19,8 @@
19#include <linux/smp.h> 19#include <linux/smp.h>
20#include <linux/spinlock.h> 20#include <linux/spinlock.h>
21#include <linux/seq_file.h> 21#include <linux/seq_file.h>
22#include <linux/of.h>
23#include <linux/of_device.h>
22 24
23#include <asm/ptrace.h> 25#include <asm/ptrace.h>
24#include <asm/processor.h> 26#include <asm/processor.h>
@@ -34,7 +36,6 @@
34#include <asm/io.h> 36#include <asm/io.h>
35#include <asm/pgalloc.h> 37#include <asm/pgalloc.h>
36#include <asm/pgtable.h> 38#include <asm/pgtable.h>
37#include <asm/sbus.h>
38#include <asm/sbi.h> 39#include <asm/sbi.h>
39#include <asm/cacheflush.h> 40#include <asm/cacheflush.h>
40#include <asm/irq_regs.h> 41#include <asm/irq_regs.h>
@@ -475,7 +476,7 @@ static void __init sun4d_init_timers(irq_handler_t counter_fn)
475 r.start = CSR_BASE(0)+BW_TIMER_LIMIT; 476 r.start = CSR_BASE(0)+BW_TIMER_LIMIT;
476#endif 477#endif
477 r.flags = 0xf; 478 r.flags = 0xf;
478 sun4d_timers = (struct sun4d_timer_regs *) sbus_ioremap(&r, 0, 479 sun4d_timers = (struct sun4d_timer_regs *) of_ioremap(&r, 0,
479 PAGE_SIZE, "user timer"); 480 PAGE_SIZE, "user timer");
480 481
481 sun4d_timers->l10_timer_limit = (((1000000/HZ) + 1) << 10); 482 sun4d_timers->l10_timer_limit = (((1000000/HZ) + 1) << 10);
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c
index d66334b853ef..3481feca3354 100644
--- a/arch/sparc/kernel/sun4m_irq.c
+++ b/arch/sparc/kernel/sun4m_irq.c
@@ -20,6 +20,8 @@
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/ioport.h> 22#include <linux/ioport.h>
23#include <linux/of.h>
24#include <linux/of_device.h>
23 25
24#include <asm/ptrace.h> 26#include <asm/ptrace.h>
25#include <asm/processor.h> 27#include <asm/processor.h>
@@ -35,7 +37,6 @@
35#include <asm/smp.h> 37#include <asm/smp.h>
36#include <asm/irq.h> 38#include <asm/irq.h>
37#include <asm/io.h> 39#include <asm/io.h>
38#include <asm/sbus.h>
39#include <asm/cacheflush.h> 40#include <asm/cacheflush.h>
40 41
41#include "irq.h" 42#include "irq.h"
@@ -327,13 +328,13 @@ static void __init sun4m_init_timers(irq_handler_t counter_fn)
327 /* Map the per-cpu Counter registers. */ 328 /* Map the per-cpu Counter registers. */
328 r.flags = cnt_regs[0].which_io; 329 r.flags = cnt_regs[0].which_io;
329 r.start = cnt_regs[0].phys_addr; 330 r.start = cnt_regs[0].phys_addr;
330 sun4m_timers = (struct sun4m_timer_regs *) sbus_ioremap(&r, 0, 331 sun4m_timers = (struct sun4m_timer_regs *) of_ioremap(&r, 0,
331 PAGE_SIZE*SUN4M_NCPUS, "sun4m_cpu_cnt"); 332 PAGE_SIZE*SUN4M_NCPUS, "sun4m_cpu_cnt");
332 /* Map the system Counter register. */ 333 /* Map the system Counter register. */
333 /* XXX Here we expect consequent calls to yeld adjusent maps. */ 334 /* XXX Here we expect consequent calls to yeld adjusent maps. */
334 r.flags = cnt_regs[4].which_io; 335 r.flags = cnt_regs[4].which_io;
335 r.start = cnt_regs[4].phys_addr; 336 r.start = cnt_regs[4].phys_addr;
336 sbus_ioremap(&r, 0, cnt_regs[4].reg_size, "sun4m_sys_cnt"); 337 of_ioremap(&r, 0, cnt_regs[4].reg_size, "sun4m_sys_cnt");
337 338
338 sun4m_timers->l10_timer_limit = (((1000000/HZ) + 1) << 10); 339 sun4m_timers->l10_timer_limit = (((1000000/HZ) + 1) << 10);
339 master_l10_counter = &sun4m_timers->l10_cur_count; 340 master_l10_counter = &sun4m_timers->l10_cur_count;
@@ -411,13 +412,13 @@ void __init sun4m_init_IRQ(void)
411 /* Map the interrupt registers for all possible cpus. */ 412 /* Map the interrupt registers for all possible cpus. */
412 r.flags = int_regs[0].which_io; 413 r.flags = int_regs[0].which_io;
413 r.start = int_regs[0].phys_addr; 414 r.start = int_regs[0].phys_addr;
414 sun4m_interrupts = (struct sun4m_intregs *) sbus_ioremap(&r, 0, 415 sun4m_interrupts = (struct sun4m_intregs *) of_ioremap(&r, 0,
415 PAGE_SIZE*SUN4M_NCPUS, "interrupts_percpu"); 416 PAGE_SIZE*SUN4M_NCPUS, "interrupts_percpu");
416 417
417 /* Map the system interrupt control registers. */ 418 /* Map the system interrupt control registers. */
418 r.flags = int_regs[4].which_io; 419 r.flags = int_regs[4].which_io;
419 r.start = int_regs[4].phys_addr; 420 r.start = int_regs[4].phys_addr;
420 sbus_ioremap(&r, 0, int_regs[4].reg_size, "interrupts_system"); 421 of_ioremap(&r, 0, int_regs[4].reg_size, "interrupts_system");
421 422
422 sun4m_interrupts->set = ~SUN4M_INT_MASKALL; 423 sun4m_interrupts->set = ~SUN4M_INT_MASKALL;
423 for (i = 0; !cpu_find_by_instance(i, NULL, &mid); i++) 424 for (i = 0; !cpu_find_by_instance(i, NULL, &mid); i++)
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c
index 0762f5db1924..a713bb43db84 100644
--- a/arch/sparc/kernel/time.c
+++ b/arch/sparc/kernel/time.c
@@ -28,6 +28,7 @@
28#include <linux/pci.h> 28#include <linux/pci.h>
29#include <linux/ioport.h> 29#include <linux/ioport.h>
30#include <linux/profile.h> 30#include <linux/profile.h>
31#include <linux/of.h>
31#include <linux/of_device.h> 32#include <linux/of_device.h>
32 33
33#include <asm/oplib.h> 34#include <asm/oplib.h>
@@ -260,7 +261,7 @@ static inline void sun4_clock_probe(void)
260 if( idprom->id_machtype == (SM_SUN4 | SM_4_330) ) { 261 if( idprom->id_machtype == (SM_SUN4 | SM_4_330) ) {
261 sp_clock_typ = MSTK48T02; 262 sp_clock_typ = MSTK48T02;
262 r.start = sun4_clock_physaddr; 263 r.start = sun4_clock_physaddr;
263 mstk48t02_regs = sbus_ioremap(&r, 0, 264 mstk48t02_regs = of_ioremap(&r, 0,
264 sizeof(struct mostek48t02), NULL); 265 sizeof(struct mostek48t02), NULL);
265 mstk48t08_regs = NULL; /* To catch weirdness */ 266 mstk48t08_regs = NULL; /* To catch weirdness */
266 intersil_clock = NULL; /* just in case */ 267 intersil_clock = NULL; /* just in case */
@@ -274,7 +275,7 @@ static inline void sun4_clock_probe(void)
274 sp_clock_typ = INTERSIL; 275 sp_clock_typ = INTERSIL;
275 r.start = sun4_clock_physaddr; 276 r.start = sun4_clock_physaddr;
276 intersil_clock = (struct intersil *) 277 intersil_clock = (struct intersil *)
277 sbus_ioremap(&r, 0, sizeof(*intersil_clock), "intersil"); 278 of_ioremap(&r, 0, sizeof(*intersil_clock), "intersil");
278 mstk48t02_regs = 0; /* just be sure */ 279 mstk48t02_regs = 0; /* just be sure */
279 mstk48t08_regs = NULL; /* ditto */ 280 mstk48t08_regs = NULL; /* ditto */
280 /* initialise the clock */ 281 /* initialise the clock */