/* 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 */
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;
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;
} 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 */
}
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;
}
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);
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 */
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);
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();
#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)
}
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();
}
static inline int __pmac
-polled_recv_byte(volatile unsigned char __iomem *via)
+polled_recv_byte(volatile unsigned char *via)
{
int x;
{
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];