Commit 454eeb2d authored by David S. Miller's avatar David S. Miller

sparc: Convert remaining sbus_ioremap() and sbus_iounmap() users.

Use of_ioremap() and of_iounmap() instead.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 98261dd1
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
#ifndef __ASM_SPARC_FLOPPY_H #ifndef __ASM_SPARC_FLOPPY_H
#define __ASM_SPARC_FLOPPY_H #define __ASM_SPARC_FLOPPY_H
#include <linux/of.h>
#include <linux/of_device.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/system.h> #include <asm/system.h>
...@@ -343,7 +346,7 @@ static int sun_floppy_init(void) ...@@ -343,7 +346,7 @@ static int sun_floppy_init(void)
r.flags = fd_regs[0].which_io; r.flags = fd_regs[0].which_io;
r.start = fd_regs[0].phys_addr; r.start = fd_regs[0].phys_addr;
sun_fdc = (struct sun_flpy_controller *) 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... */ /* Last minute sanity check... */
if(sun_fdc->status_82072 == 0xff) { if(sun_fdc->status_82072 == 0xff) {
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/auxio.h> #include <asm/auxio.h>
...@@ -59,7 +61,7 @@ void __init auxio_probe(void) ...@@ -59,7 +61,7 @@ void __init auxio_probe(void)
r.flags = auxregs[0].which_io & 0xF; r.flags = auxregs[0].which_io & 0xF;
r.start = auxregs[0].phys_addr; r.start = auxregs[0].phys_addr;
r.end = auxregs[0].phys_addr + auxregs[0].reg_size - 1; 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. */ /* Fix the address on sun4m and sun4c. */
if((((unsigned long) auxregs[0].phys_addr) & 3) == 3 || if((((unsigned long) auxregs[0].phys_addr) & 3) == 3 ||
sparc_cpu_model == sun4c) sparc_cpu_model == sun4c)
...@@ -128,7 +130,7 @@ void __init auxio_power_probe(void) ...@@ -128,7 +130,7 @@ void __init auxio_power_probe(void)
r.flags = regs.which_io & 0xF; r.flags = regs.which_io & 0xF;
r.start = regs.phys_addr; r.start = regs.phys_addr;
r.end = regs.phys_addr + regs.reg_size - 1; 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"); regs.reg_size, "auxpower");
/* Display a quick message on the console. */ /* Display a quick message on the console. */
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include "irq.h" #include "irq.h"
#include <asm/ptrace.h> #include <asm/ptrace.h>
...@@ -34,7 +36,6 @@ ...@@ -34,7 +36,6 @@
#include <asm/sun4paddr.h> #include <asm/sun4paddr.h>
#include <asm/idprom.h> #include <asm/idprom.h>
#include <asm/machines.h> #include <asm/machines.h>
#include <asm/sbus.h>
#if 0 #if 0
static struct resource sun4c_timer_eb = { "sun4c_timer" }; static struct resource sun4c_timer_eb = { "sun4c_timer" };
...@@ -224,7 +225,7 @@ void __init sun4c_init_IRQ(void) ...@@ -224,7 +225,7 @@ void __init sun4c_init_IRQ(void)
memset(&phyres, 0, sizeof(struct resource)); memset(&phyres, 0, sizeof(struct resource));
phyres.flags = int_regs[0].which_io; phyres.flags = int_regs[0].which_io;
phyres.start = int_regs[0].phys_addr; 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"); int_regs[0].reg_size, "sun4c_intr");
} }
} }
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/processor.h> #include <asm/processor.h>
...@@ -34,7 +36,6 @@ ...@@ -34,7 +36,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/sbus.h>
#include <asm/sbi.h> #include <asm/sbi.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/irq_regs.h> #include <asm/irq_regs.h>
...@@ -475,7 +476,7 @@ static void __init sun4d_init_timers(irq_handler_t counter_fn) ...@@ -475,7 +476,7 @@ static void __init sun4d_init_timers(irq_handler_t counter_fn)
r.start = CSR_BASE(0)+BW_TIMER_LIMIT; r.start = CSR_BASE(0)+BW_TIMER_LIMIT;
#endif #endif
r.flags = 0xf; 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"); PAGE_SIZE, "user timer");
sun4d_timers->l10_timer_limit = (((1000000/HZ) + 1) << 10); sun4d_timers->l10_timer_limit = (((1000000/HZ) + 1) << 10);
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/processor.h> #include <asm/processor.h>
...@@ -35,7 +37,6 @@ ...@@ -35,7 +37,6 @@
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/sbus.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include "irq.h" #include "irq.h"
...@@ -327,13 +328,13 @@ static void __init sun4m_init_timers(irq_handler_t counter_fn) ...@@ -327,13 +328,13 @@ static void __init sun4m_init_timers(irq_handler_t counter_fn)
/* Map the per-cpu Counter registers. */ /* Map the per-cpu Counter registers. */
r.flags = cnt_regs[0].which_io; r.flags = cnt_regs[0].which_io;
r.start = cnt_regs[0].phys_addr; 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"); PAGE_SIZE*SUN4M_NCPUS, "sun4m_cpu_cnt");
/* Map the system Counter register. */ /* Map the system Counter register. */
/* XXX Here we expect consequent calls to yeld adjusent maps. */ /* XXX Here we expect consequent calls to yeld adjusent maps. */
r.flags = cnt_regs[4].which_io; r.flags = cnt_regs[4].which_io;
r.start = cnt_regs[4].phys_addr; 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); sun4m_timers->l10_timer_limit = (((1000000/HZ) + 1) << 10);
master_l10_counter = &sun4m_timers->l10_cur_count; master_l10_counter = &sun4m_timers->l10_cur_count;
...@@ -411,13 +412,13 @@ void __init sun4m_init_IRQ(void) ...@@ -411,13 +412,13 @@ void __init sun4m_init_IRQ(void)
/* Map the interrupt registers for all possible cpus. */ /* Map the interrupt registers for all possible cpus. */
r.flags = int_regs[0].which_io; r.flags = int_regs[0].which_io;
r.start = int_regs[0].phys_addr; 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"); PAGE_SIZE*SUN4M_NCPUS, "interrupts_percpu");
/* Map the system interrupt control registers. */ /* Map the system interrupt control registers. */
r.flags = int_regs[4].which_io; r.flags = int_regs[4].which_io;
r.start = int_regs[4].phys_addr; 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; sun4m_interrupts->set = ~SUN4M_INT_MASKALL;
for (i = 0; !cpu_find_by_instance(i, NULL, &mid); i++) for (i = 0; !cpu_find_by_instance(i, NULL, &mid); i++)
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/profile.h> #include <linux/profile.h>
#include <linux/of.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <asm/oplib.h> #include <asm/oplib.h>
...@@ -260,7 +261,7 @@ static inline void sun4_clock_probe(void) ...@@ -260,7 +261,7 @@ static inline void sun4_clock_probe(void)
if( idprom->id_machtype == (SM_SUN4 | SM_4_330) ) { if( idprom->id_machtype == (SM_SUN4 | SM_4_330) ) {
sp_clock_typ = MSTK48T02; sp_clock_typ = MSTK48T02;
r.start = sun4_clock_physaddr; r.start = sun4_clock_physaddr;
mstk48t02_regs = sbus_ioremap(&r, 0, mstk48t02_regs = of_ioremap(&r, 0,
sizeof(struct mostek48t02), NULL); sizeof(struct mostek48t02), NULL);
mstk48t08_regs = NULL; /* To catch weirdness */ mstk48t08_regs = NULL; /* To catch weirdness */
intersil_clock = NULL; /* just in case */ intersil_clock = NULL; /* just in case */
...@@ -274,7 +275,7 @@ static inline void sun4_clock_probe(void) ...@@ -274,7 +275,7 @@ static inline void sun4_clock_probe(void)
sp_clock_typ = INTERSIL; sp_clock_typ = INTERSIL;
r.start = sun4_clock_physaddr; r.start = sun4_clock_physaddr;
intersil_clock = (struct intersil *) 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 */ mstk48t02_regs = 0; /* just be sure */
mstk48t08_regs = NULL; /* ditto */ mstk48t08_regs = NULL; /* ditto */
/* initialise the clock */ /* initialise the clock */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment