]> Pileus Git - ~andy/linux/commitdiff
sparc: Convert remaining sbus_ioremap() and sbus_iounmap() users.
authorDavid S. Miller <davem@davemloft.net>
Wed, 27 Aug 2008 11:05:35 +0000 (04:05 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Aug 2008 09:15:13 +0000 (02:15 -0700)
Use of_ioremap() and of_iounmap() instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/floppy_32.h
arch/sparc/kernel/auxio.c
arch/sparc/kernel/sun4c_irq.c
arch/sparc/kernel/sun4d_irq.c
arch/sparc/kernel/sun4m_irq.c
arch/sparc/kernel/time.c

index ff2b91c6eeffad069fb257b1d19f14cf161849b3..c792830636decfa4c3652d25d9947837bdf362f2 100644 (file)
@@ -6,6 +6,9 @@
 #ifndef __ASM_SPARC_FLOPPY_H
 #define __ASM_SPARC_FLOPPY_H
 
+#include <linux/of.h>
+#include <linux/of_device.h>
+
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
@@ -343,7 +346,7 @@ static int sun_floppy_init(void)
        r.flags = fd_regs[0].which_io;
        r.start = fd_regs[0].phys_addr;
        sun_fdc = (struct sun_flpy_controller *)
-           sbus_ioremap(&r, 0, fd_regs[0].reg_size, "floppy");
+           of_ioremap(&r, 0, fd_regs[0].reg_size, "floppy");
 
        /* Last minute sanity check... */
        if(sun_fdc->status_82072 == 0xff) {
index baf4ed3fb0f3d116f6966c48a93a6b7551884bc0..09c857215a52fad2e2229ac6c86739eee4a6789b 100644 (file)
@@ -6,6 +6,8 @@
 #include <linux/stddef.h>
 #include <linux/init.h>
 #include <linux/spinlock.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
 #include <asm/oplib.h>
 #include <asm/io.h>
 #include <asm/auxio.h>
@@ -59,7 +61,7 @@ void __init auxio_probe(void)
        r.flags = auxregs[0].which_io & 0xF;
        r.start = auxregs[0].phys_addr;
        r.end = auxregs[0].phys_addr + auxregs[0].reg_size - 1;
-       auxio_register = sbus_ioremap(&r, 0, auxregs[0].reg_size, "auxio");
+       auxio_register = of_ioremap(&r, 0, auxregs[0].reg_size, "auxio");
        /* Fix the address on sun4m and sun4c. */
        if((((unsigned long) auxregs[0].phys_addr) & 3) == 3 ||
           sparc_cpu_model == sun4c)
@@ -128,7 +130,7 @@ void __init auxio_power_probe(void)
        r.flags = regs.which_io & 0xF;
        r.start = regs.phys_addr;
        r.end = regs.phys_addr + regs.reg_size - 1;
-       auxio_power_register = (unsigned char *) sbus_ioremap(&r, 0,
+       auxio_power_register = (unsigned char *) of_ioremap(&r, 0,
            regs.reg_size, "auxpower");
 
        /* Display a quick message on the console. */
index a5a32a0b10d1ab994098bde176c452371776c3d1..a74582455cce93e38afdfd38cbc7a0acd89c777a 100644 (file)
@@ -18,6 +18,8 @@
 #include <linux/interrupt.h>
 #include <linux/slab.h>
 #include <linux/init.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
 #include "irq.h"
 
 #include <asm/ptrace.h>
@@ -34,7 +36,6 @@
 #include <asm/sun4paddr.h>
 #include <asm/idprom.h>
 #include <asm/machines.h>
-#include <asm/sbus.h>
 
 #if 0
 static struct resource sun4c_timer_eb = { "sun4c_timer" };
@@ -224,7 +225,7 @@ void __init sun4c_init_IRQ(void)
                        memset(&phyres, 0, sizeof(struct resource));
                        phyres.flags = int_regs[0].which_io;
                        phyres.start = int_regs[0].phys_addr;
-                       interrupt_enable = (char *) sbus_ioremap(&phyres, 0,
+                       interrupt_enable = (char *) of_ioremap(&phyres, 0,
                            int_regs[0].reg_size, "sun4c_intr");
                }
        }
index acfb447c00d0fd4fbbb87ed9a74addf7abe19460..c4a2bfb750a4937eac2b782ee0ae03893096ec09 100644 (file)
@@ -19,6 +19,8 @@
 #include <linux/smp.h>
 #include <linux/spinlock.h>
 #include <linux/seq_file.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
 
 #include <asm/ptrace.h>
 #include <asm/processor.h>
@@ -34,7 +36,6 @@
 #include <asm/io.h>
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
-#include <asm/sbus.h>
 #include <asm/sbi.h>
 #include <asm/cacheflush.h>
 #include <asm/irq_regs.h>
@@ -475,7 +476,7 @@ static void __init sun4d_init_timers(irq_handler_t counter_fn)
        r.start = CSR_BASE(0)+BW_TIMER_LIMIT;
 #endif
        r.flags = 0xf;
-       sun4d_timers = (struct sun4d_timer_regs *) sbus_ioremap(&r, 0,
+       sun4d_timers = (struct sun4d_timer_regs *) of_ioremap(&r, 0,
            PAGE_SIZE, "user timer");
 
        sun4d_timers->l10_timer_limit =  (((1000000/HZ) + 1) << 10);
index d66334b853ef25c45d0929992856856d1cce664c..3481feca3354f1d5c014773ecc3377b1cb8c463a 100644 (file)
@@ -20,6 +20,8 @@
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
 
 #include <asm/ptrace.h>
 #include <asm/processor.h>
@@ -35,7 +37,6 @@
 #include <asm/smp.h>
 #include <asm/irq.h>
 #include <asm/io.h>
-#include <asm/sbus.h>
 #include <asm/cacheflush.h>
 
 #include "irq.h"
@@ -327,13 +328,13 @@ static void __init sun4m_init_timers(irq_handler_t counter_fn)
        /* Map the per-cpu Counter registers. */
        r.flags = cnt_regs[0].which_io;
        r.start = cnt_regs[0].phys_addr;
-       sun4m_timers = (struct sun4m_timer_regs *) sbus_ioremap(&r, 0,
+       sun4m_timers = (struct sun4m_timer_regs *) of_ioremap(&r, 0,
            PAGE_SIZE*SUN4M_NCPUS, "sun4m_cpu_cnt");
        /* Map the system Counter register. */
        /* XXX Here we expect consequent calls to yeld adjusent maps. */
        r.flags = cnt_regs[4].which_io;
        r.start = cnt_regs[4].phys_addr;
-       sbus_ioremap(&r, 0, cnt_regs[4].reg_size, "sun4m_sys_cnt");
+       of_ioremap(&r, 0, cnt_regs[4].reg_size, "sun4m_sys_cnt");
 
        sun4m_timers->l10_timer_limit =  (((1000000/HZ) + 1) << 10);
        master_l10_counter = &sun4m_timers->l10_cur_count;
@@ -411,13 +412,13 @@ void __init sun4m_init_IRQ(void)
        /* Map the interrupt registers for all possible cpus. */
        r.flags = int_regs[0].which_io;
        r.start = int_regs[0].phys_addr;
-       sun4m_interrupts = (struct sun4m_intregs *) sbus_ioremap(&r, 0,
+       sun4m_interrupts = (struct sun4m_intregs *) of_ioremap(&r, 0,
            PAGE_SIZE*SUN4M_NCPUS, "interrupts_percpu");
 
        /* Map the system interrupt control registers. */
        r.flags = int_regs[4].which_io;
        r.start = int_regs[4].phys_addr;
-       sbus_ioremap(&r, 0, int_regs[4].reg_size, "interrupts_system");
+       of_ioremap(&r, 0, int_regs[4].reg_size, "interrupts_system");
 
        sun4m_interrupts->set = ~SUN4M_INT_MASKALL;
        for (i = 0; !cpu_find_by_instance(i, NULL, &mid); i++)
index 0762f5db19240d171a0c0f3beb8fc44ad5ab5402..a713bb43db84e90e00278a09fa29b5d09de11022 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/pci.h>
 #include <linux/ioport.h>
 #include <linux/profile.h>
+#include <linux/of.h>
 #include <linux/of_device.h>
 
 #include <asm/oplib.h>
@@ -260,7 +261,7 @@ static inline void sun4_clock_probe(void)
        if( idprom->id_machtype == (SM_SUN4 | SM_4_330) ) {
                sp_clock_typ = MSTK48T02;
                r.start = sun4_clock_physaddr;
-               mstk48t02_regs = sbus_ioremap(&r, 0,
+               mstk48t02_regs = of_ioremap(&r, 0,
                                       sizeof(struct mostek48t02), NULL);
                mstk48t08_regs = NULL;  /* To catch weirdness */
                intersil_clock = NULL;  /* just in case */
@@ -274,7 +275,7 @@ static inline void sun4_clock_probe(void)
                sp_clock_typ = INTERSIL;
                r.start = sun4_clock_physaddr;
                intersil_clock = (struct intersil *) 
-                   sbus_ioremap(&r, 0, sizeof(*intersil_clock), "intersil");
+                   of_ioremap(&r, 0, sizeof(*intersil_clock), "intersil");
                mstk48t02_regs = 0;  /* just be sure */
                mstk48t08_regs = NULL;  /* ditto */
                /* initialise the clock */