Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+23 -14
+4 -1
arch/sparc/include/asm/floppy_32.h
··· 6 6 #ifndef __ASM_SPARC_FLOPPY_H 7 7 #define __ASM_SPARC_FLOPPY_H 8 8 9 + #include <linux/of.h> 10 + #include <linux/of_device.h> 11 + 9 12 #include <asm/page.h> 10 13 #include <asm/pgtable.h> 11 14 #include <asm/system.h> ··· 346 343 r.flags = fd_regs[0].which_io; 347 344 r.start = fd_regs[0].phys_addr; 348 345 sun_fdc = (struct sun_flpy_controller *) 349 - sbus_ioremap(&r, 0, fd_regs[0].reg_size, "floppy"); 346 + of_ioremap(&r, 0, fd_regs[0].reg_size, "floppy"); 350 347 351 348 /* Last minute sanity check... */ 352 349 if(sun_fdc->status_82072 == 0xff) {
+4 -2
arch/sparc/kernel/auxio.c
··· 6 6 #include <linux/stddef.h> 7 7 #include <linux/init.h> 8 8 #include <linux/spinlock.h> 9 + #include <linux/of.h> 10 + #include <linux/of_device.h> 9 11 #include <asm/oplib.h> 10 12 #include <asm/io.h> 11 13 #include <asm/auxio.h> ··· 61 59 r.flags = auxregs[0].which_io & 0xF; 62 60 r.start = auxregs[0].phys_addr; 63 61 r.end = auxregs[0].phys_addr + auxregs[0].reg_size - 1; 64 - auxio_register = sbus_ioremap(&r, 0, auxregs[0].reg_size, "auxio"); 62 + auxio_register = of_ioremap(&r, 0, auxregs[0].reg_size, "auxio"); 65 63 /* Fix the address on sun4m and sun4c. */ 66 64 if((((unsigned long) auxregs[0].phys_addr) & 3) == 3 || 67 65 sparc_cpu_model == sun4c) ··· 130 128 r.flags = regs.which_io & 0xF; 131 129 r.start = regs.phys_addr; 132 130 r.end = regs.phys_addr + regs.reg_size - 1; 133 - auxio_power_register = (unsigned char *) sbus_ioremap(&r, 0, 131 + auxio_power_register = (unsigned char *) of_ioremap(&r, 0, 134 132 regs.reg_size, "auxpower"); 135 133 136 134 /* Display a quick message on the console. */
+3 -2
arch/sparc/kernel/sun4c_irq.c
··· 18 18 #include <linux/interrupt.h> 19 19 #include <linux/slab.h> 20 20 #include <linux/init.h> 21 + #include <linux/of.h> 22 + #include <linux/of_device.h> 21 23 #include "irq.h" 22 24 23 25 #include <asm/ptrace.h> ··· 36 34 #include <asm/sun4paddr.h> 37 35 #include <asm/idprom.h> 38 36 #include <asm/machines.h> 39 - #include <asm/sbus.h> 40 37 41 38 #if 0 42 39 static struct resource sun4c_timer_eb = { "sun4c_timer" }; ··· 225 224 memset(&phyres, 0, sizeof(struct resource)); 226 225 phyres.flags = int_regs[0].which_io; 227 226 phyres.start = int_regs[0].phys_addr; 228 - interrupt_enable = (char *) sbus_ioremap(&phyres, 0, 227 + interrupt_enable = (char *) of_ioremap(&phyres, 0, 229 228 int_regs[0].reg_size, "sun4c_intr"); 230 229 } 231 230 }
+3 -2
arch/sparc/kernel/sun4d_irq.c
··· 19 19 #include <linux/smp.h> 20 20 #include <linux/spinlock.h> 21 21 #include <linux/seq_file.h> 22 + #include <linux/of.h> 23 + #include <linux/of_device.h> 22 24 23 25 #include <asm/ptrace.h> 24 26 #include <asm/processor.h> ··· 36 34 #include <asm/io.h> 37 35 #include <asm/pgalloc.h> 38 36 #include <asm/pgtable.h> 39 - #include <asm/sbus.h> 40 37 #include <asm/sbi.h> 41 38 #include <asm/cacheflush.h> 42 39 #include <asm/irq_regs.h> ··· 476 475 r.start = CSR_BASE(0)+BW_TIMER_LIMIT; 477 476 #endif 478 477 r.flags = 0xf; 479 - sun4d_timers = (struct sun4d_timer_regs *) sbus_ioremap(&r, 0, 478 + sun4d_timers = (struct sun4d_timer_regs *) of_ioremap(&r, 0, 480 479 PAGE_SIZE, "user timer"); 481 480 482 481 sun4d_timers->l10_timer_limit = (((1000000/HZ) + 1) << 10);
+6 -5
arch/sparc/kernel/sun4m_irq.c
··· 20 20 #include <linux/slab.h> 21 21 #include <linux/init.h> 22 22 #include <linux/ioport.h> 23 + #include <linux/of.h> 24 + #include <linux/of_device.h> 23 25 24 26 #include <asm/ptrace.h> 25 27 #include <asm/processor.h> ··· 37 35 #include <asm/smp.h> 38 36 #include <asm/irq.h> 39 37 #include <asm/io.h> 40 - #include <asm/sbus.h> 41 38 #include <asm/cacheflush.h> 42 39 43 40 #include "irq.h" ··· 328 327 /* Map the per-cpu Counter registers. */ 329 328 r.flags = cnt_regs[0].which_io; 330 329 r.start = cnt_regs[0].phys_addr; 331 - sun4m_timers = (struct sun4m_timer_regs *) sbus_ioremap(&r, 0, 330 + sun4m_timers = (struct sun4m_timer_regs *) of_ioremap(&r, 0, 332 331 PAGE_SIZE*SUN4M_NCPUS, "sun4m_cpu_cnt"); 333 332 /* Map the system Counter register. */ 334 333 /* XXX Here we expect consequent calls to yeld adjusent maps. */ 335 334 r.flags = cnt_regs[4].which_io; 336 335 r.start = cnt_regs[4].phys_addr; 337 - sbus_ioremap(&r, 0, cnt_regs[4].reg_size, "sun4m_sys_cnt"); 336 + of_ioremap(&r, 0, cnt_regs[4].reg_size, "sun4m_sys_cnt"); 338 337 339 338 sun4m_timers->l10_timer_limit = (((1000000/HZ) + 1) << 10); 340 339 master_l10_counter = &sun4m_timers->l10_cur_count; ··· 412 411 /* Map the interrupt registers for all possible cpus. */ 413 412 r.flags = int_regs[0].which_io; 414 413 r.start = int_regs[0].phys_addr; 415 - sun4m_interrupts = (struct sun4m_intregs *) sbus_ioremap(&r, 0, 414 + sun4m_interrupts = (struct sun4m_intregs *) of_ioremap(&r, 0, 416 415 PAGE_SIZE*SUN4M_NCPUS, "interrupts_percpu"); 417 416 418 417 /* Map the system interrupt control registers. */ 419 418 r.flags = int_regs[4].which_io; 420 419 r.start = int_regs[4].phys_addr; 421 - sbus_ioremap(&r, 0, int_regs[4].reg_size, "interrupts_system"); 420 + of_ioremap(&r, 0, int_regs[4].reg_size, "interrupts_system"); 422 421 423 422 sun4m_interrupts->set = ~SUN4M_INT_MASKALL; 424 423 for (i = 0; !cpu_find_by_instance(i, NULL, &mid); i++)
+3 -2
arch/sparc/kernel/time.c
··· 28 28 #include <linux/pci.h> 29 29 #include <linux/ioport.h> 30 30 #include <linux/profile.h> 31 + #include <linux/of.h> 31 32 #include <linux/of_device.h> 32 33 33 34 #include <asm/oplib.h> ··· 261 260 if( idprom->id_machtype == (SM_SUN4 | SM_4_330) ) { 262 261 sp_clock_typ = MSTK48T02; 263 262 r.start = sun4_clock_physaddr; 264 - mstk48t02_regs = sbus_ioremap(&r, 0, 263 + mstk48t02_regs = of_ioremap(&r, 0, 265 264 sizeof(struct mostek48t02), NULL); 266 265 mstk48t08_regs = NULL; /* To catch weirdness */ 267 266 intersil_clock = NULL; /* just in case */ ··· 275 274 sp_clock_typ = INTERSIL; 276 275 r.start = sun4_clock_physaddr; 277 276 intersil_clock = (struct intersil *) 278 - sbus_ioremap(&r, 0, sizeof(*intersil_clock), "intersil"); 277 + of_ioremap(&r, 0, sizeof(*intersil_clock), "intersil"); 279 278 mstk48t02_regs = 0; /* just be sure */ 280 279 mstk48t08_regs = NULL; /* ditto */ 281 280 /* initialise the clock */