X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmacintosh%2Fvia-pmu.c;h=9f4147e3df035590ced989efcb05e04fd502e90b;hb=3ec04f3d2903fdf6d9849a8633af59b8628164a5;hp=26c9dd7966fb1c738c4d65c882cd043657d8d614;hpb=8d40237c730b8be87c1b80a5d96b9c603fefa829;p=linux-2.6.git diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 26c9dd796..9f4147e3d 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -72,7 +72,7 @@ /* How many iterations between battery polls */ #define BATTERY_POLLING_COUNT 2 -static volatile unsigned char __iomem *via; +static volatile unsigned char *via; /* VIA registers - spaced 0x200 bytes apart */ #define RS 0x200 /* skip between registers */ @@ -141,7 +141,7 @@ static struct device_node *vias; static int pmu_kind = PMU_UNKNOWN; static int pmu_fully_inited = 0; static int pmu_has_adb; -static unsigned char __iomem *gpio_reg = NULL; +static unsigned char *gpio_reg = NULL; static int gpio_irq = -1; static int gpio_irq_enabled = -1; static volatile int pmu_suspended = 0; @@ -153,8 +153,8 @@ static int drop_interrupts; static int option_lid_wakeup = 1; static int sleep_in_progress; static int can_sleep; -#endif /* CONFIG_PMAC_PBOOK */ static unsigned long async_req_locks; +#endif /* CONFIG_PMAC_PBOOK */ static unsigned int pmu_irq_stats[11]; static struct proc_dir_entry *proc_pmu_root; @@ -352,7 +352,7 @@ find_via_pmu(void) } else pmu_kind = PMU_UNKNOWN; - via = ioremap(vias->addrs->address, 0x2000); + via = (volatile unsigned char *) ioremap(vias->addrs->address, 0x2000); out_8(&via[IER], IER_CLR | 0x7f); /* disable all intrs */ out_8(&via[IFR], 0x7f); /* clear IFR */ @@ -418,7 +418,7 @@ static int __init via_pmu_start(void) } if (pmu_kind == PMU_KEYLARGO_BASED && gpio_irq != -1) { - if (request_irq(gpio_irq, gpio1_interrupt, 0, "GPIO1-ADB", (void *)0)) + if (request_irq(gpio_irq, gpio1_interrupt, 0, "GPIO1/ADB", (void *)0)) printk(KERN_ERR "pmu: can't get irq %d (GPIO1)\n", gpio_irq); gpio_irq_enabled = 1; } @@ -1164,7 +1164,7 @@ wait_for_ack(void) static inline void send_byte(int x) { - volatile unsigned char __iomem *v = via; + volatile unsigned char *v = via; out_8(&v[ACR], in_8(&v[ACR]) | SR_OUT | SR_EXT); out_8(&v[SR], x); @@ -1175,7 +1175,7 @@ send_byte(int x) static inline void recv_byte(void) { - volatile unsigned char __iomem *v = via; + volatile unsigned char *v = via; out_8(&v[ACR], (in_8(&v[ACR]) & ~SR_OUT) | SR_EXT); in_8(&v[SR]); /* resets SR */ @@ -2630,8 +2630,8 @@ powerbook_sleep_3400(void) unsigned int hid0; unsigned long p; struct adb_request sleep_req; - void __iomem *mem_ctrl; - unsigned int __iomem *mem_ctrl_sleep; + char *mem_ctrl; + unsigned int *mem_ctrl_sleep; /* first map in the memory controller registers */ mem_ctrl = ioremap(PB3400_MEM_CTRL, 0x100); @@ -2639,7 +2639,7 @@ powerbook_sleep_3400(void) printk("powerbook_sleep_3400: ioremap failed\n"); return -ENOMEM; } - mem_ctrl_sleep = mem_ctrl + PB3400_MEM_CTRL_SLEEP; + mem_ctrl_sleep = (unsigned int *) (mem_ctrl + PB3400_MEM_CTRL_SLEEP); /* Allocate room for PCI save */ pbook_alloc_pci_save(); @@ -2977,7 +2977,7 @@ void pmu_device_init(void) #ifdef DEBUG_SLEEP static inline void __pmac -polled_handshake(volatile unsigned char __iomem *via) +polled_handshake(volatile unsigned char *via) { via[B] &= ~TREQ; eieio(); while ((via[B] & TACK) != 0) @@ -2988,7 +2988,7 @@ polled_handshake(volatile unsigned char __iomem *via) } static inline void __pmac -polled_send_byte(volatile unsigned char __iomem *via, int x) +polled_send_byte(volatile unsigned char *via, int x) { via[ACR] |= SR_OUT | SR_EXT; eieio(); via[SR] = x; eieio(); @@ -2996,7 +2996,7 @@ polled_send_byte(volatile unsigned char __iomem *via, int x) } static inline int __pmac -polled_recv_byte(volatile unsigned char __iomem *via) +polled_recv_byte(volatile unsigned char *via) { int x; @@ -3012,7 +3012,7 @@ pmu_polled_request(struct adb_request *req) { unsigned long flags; int i, l, c; - volatile unsigned char __iomem *v = via; + volatile unsigned char *v = via; req->complete = 1; c = req->data[0];