auxio_32.c (8cf749a8f506b06ebbf090709d64e81af519184b) | auxio_32.c (d2aca8f9a64c26dcd9b3eb27db949f830eb80b28) |
---|---|
1/* auxio.c: Probing for the Sparc AUXIO register at boot time. 2 * 3 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 */ 5 6#include <linux/stddef.h> 7#include <linux/init.h> 8#include <linux/spinlock.h> --- 92 unchanged lines hidden (view full) --- 101 panic("Can't set AUXIO register on this machine."); 102 } 103 spin_unlock_irqrestore(&auxio_lock, flags); 104} 105EXPORT_SYMBOL(set_auxio); 106 107/* sun4m power control register (AUXIO2) */ 108 | 1/* auxio.c: Probing for the Sparc AUXIO register at boot time. 2 * 3 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 */ 5 6#include <linux/stddef.h> 7#include <linux/init.h> 8#include <linux/spinlock.h> --- 92 unchanged lines hidden (view full) --- 101 panic("Can't set AUXIO register on this machine."); 102 } 103 spin_unlock_irqrestore(&auxio_lock, flags); 104} 105EXPORT_SYMBOL(set_auxio); 106 107/* sun4m power control register (AUXIO2) */ 108 |
109volatile unsigned char * auxio_power_register = NULL; | 109volatile u8 __iomem *auxio_power_register = NULL; |
110 111void __init auxio_power_probe(void) 112{ 113 struct linux_prom_registers regs; 114 phandle node; 115 struct resource r; 116 117 /* Attempt to find the sun4m power control node. */ --- 7 unchanged lines hidden (view full) --- 125 /* Map the power control register. */ 126 if (prom_getproperty(node, "reg", (char *)®s, sizeof(regs)) <= 0) 127 return; 128 prom_apply_obio_ranges(®s, 1); 129 memset(&r, 0, sizeof(r)); 130 r.flags = regs.which_io & 0xF; 131 r.start = regs.phys_addr; 132 r.end = regs.phys_addr + regs.reg_size - 1; | 110 111void __init auxio_power_probe(void) 112{ 113 struct linux_prom_registers regs; 114 phandle node; 115 struct resource r; 116 117 /* Attempt to find the sun4m power control node. */ --- 7 unchanged lines hidden (view full) --- 125 /* Map the power control register. */ 126 if (prom_getproperty(node, "reg", (char *)®s, sizeof(regs)) <= 0) 127 return; 128 prom_apply_obio_ranges(®s, 1); 129 memset(&r, 0, sizeof(r)); 130 r.flags = regs.which_io & 0xF; 131 r.start = regs.phys_addr; 132 r.end = regs.phys_addr + regs.reg_size - 1; |
133 auxio_power_register = (unsigned char *) of_ioremap(&r, 0, 134 regs.reg_size, "auxpower"); | 133 auxio_power_register = 134 (u8 __iomem *)of_ioremap(&r, 0, regs.reg_size, "auxpower"); |
135 136 /* Display a quick message on the console. */ 137 if (auxio_power_register) 138 printk(KERN_INFO "Power off control detected.\n"); 139} | 135 136 /* Display a quick message on the console. */ 137 if (auxio_power_register) 138 printk(KERN_INFO "Power off control detected.\n"); 139} |