#define UN_BIC(r,v) (UN_OUT((r), UN_IN(r) & ~(v)))
static struct device_node* uninorth_node __pmacdata;
-static u32* uninorth_base __pmacdata;
+static u32 __iomem * uninorth_base __pmacdata;
static u32 uninorth_rev __pmacdata;
static int uninorth_u3 __pmacdata;
-static void *u3_ht;
+static void __iomem *u3_ht;
/*
* For each motherboard family, we have a table of functions pointers
/* Save state & config of DBDMA channels */
for (i=0; i<13; i++) {
- volatile struct dbdma_regs* chan = (volatile struct dbdma_regs*)
+ volatile struct dbdma_regs __iomem * chan = (void __iomem *)
(macio->base + ((0x8000+i*0x100)>>2));
save[i].cmdptr_hi = in_le32(&chan->cmdptr_hi);
save[i].cmdptr = in_le32(&chan->cmdptr);
/* Save state & config of DBDMA channels */
for (i=0; i<13; i++) {
- volatile struct dbdma_regs* chan = (volatile struct dbdma_regs*)
+ volatile struct dbdma_regs __iomem * chan = (void __iomem *)
(macio->base + ((0x8000+i*0x100)>>2));
out_le32(&chan->control, (ACTIVE|DEAD|WAKE|FLUSH|PAUSE|RUN)<<16);
while (in_le32(&chan->status) & ACTIVE)
#ifndef CONFIG_POWER4
/* Fixup Hooper vs. Comet */
if (pmac_mb.model_id == PMAC_TYPE_HOOPER) {
- u32* mach_id_ptr = (u32*)ioremap(0xf3000034, 4);
+ u32 __iomem * mach_id_ptr = ioremap(0xf3000034, 4);
if (!mach_id_ptr)
return -ENODEV;
/* Here, I used to disable the media-bay on comet. It
* appears this is wrong, the floppy connector is actually
* a kind of media-bay and works with the current driver.
*/
- if ((*mach_id_ptr) & 0x20000000UL)
+ if (__raw_readl(mach_id_ptr) & 0x20000000UL)
pmac_mb.model_id = PMAC_TYPE_COMET;
iounmap(mach_id_ptr);
}
{
struct device_node* node;
int i;
- volatile u32* base;
+ volatile u32 __iomem * base;
u32* revp;
node = find_devices(name);
printk(KERN_ERR "pmac_feature: %s skipped\n", node->full_name);
return;
}
- base = (volatile u32*)ioremap(node->addrs[0].address, node->addrs[0].size);
+ base = ioremap(node->addrs[0].address, node->addrs[0].size);
if (!base) {
printk(KERN_ERR "pmac_feature: Can't map mac-io chip !\n");
return;
static unsigned long anslcd_short_delay = 80;
static unsigned long anslcd_long_delay = 3280;
-static volatile unsigned char* anslcd_ptr;
+static volatile unsigned char __iomem *anslcd_ptr;
#undef DEBUG
if (strcmp(node->parent->name, "gc"))
return -ENODEV;
- anslcd_ptr = (volatile unsigned char*)ioremap(ANSLCD_ADDR, 0x20);
+ anslcd_ptr = ioremap(ANSLCD_ADDR, 0x20);
retval = misc_register(&anslcd_dev);
if(retval < 0){
printk(KERN_INFO "LCD: misc_register failed\n");
- iounmap((void *)anslcd_ptr);
+ iounmap(anslcd_ptr);
return retval;
}
anslcd_exit(void)
{
misc_deregister(&anslcd_dev);
- iounmap((void *)anslcd_ptr);
+ iounmap(anslcd_ptr);
}
module_init(anslcd_init);
/* Bits in autopoll register */
#define APE 1 /* autopoll enable */
-static volatile struct adb_regs *adb;
+static volatile struct adb_regs __iomem *adb;
static struct adb_request *current_req, *last_req;
static spinlock_t macio_lock = SPIN_LOCK_UNLOCKED;
printk("\n"); }
#endif
- adb = (volatile struct adb_regs *)
- ioremap(adbs->addrs->address, sizeof(struct adb_regs));
+ adb = ioremap(adbs->addrs->address, sizeof(struct adb_regs));
out_8(&adb->ctrl.r, 0);
out_8(&adb->intr.r, 0);
#endif
#define MB_FCR32(bay, r) ((bay)->base + ((r) >> 2))
-#define MB_FCR8(bay, r) (((volatile __iomem u8*)((bay)->base)) + (r))
+#define MB_FCR8(bay, r) (((volatile u8 __iomem *)((bay)->base)) + (r))
#define MB_IN32(bay,r) (in_le32(MB_FCR32(bay,r)))
#define MB_OUT32(bay,r,v) (out_le32(MB_FCR32(bay,r), (v)))
#include <asm/system.h>
#include <linux/init.h>
-static volatile unsigned char *via;
+static volatile unsigned char __iomem *via;
static spinlock_t cuda_lock = SPIN_LOCK_UNLOCKED;
#ifdef CONFIG_MAC
if (vias->n_addrs < 1 || vias->n_intrs < 1)
return 0;
}
- via = (volatile unsigned char *) ioremap(vias->addrs->address, 0x2000);
+ via = ioremap(vias->addrs->address, 0x2000);
cuda_state = idle;
sys_ctrler = SYS_CTRLER_CUDA;
/* How many iterations between battery polls */
#define BATTERY_POLLING_COUNT 2
-static volatile unsigned char *via;
+static volatile unsigned char __iomem *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 *gpio_reg = NULL;
+static unsigned char __iomem *gpio_reg = NULL;
static int gpio_irq = -1;
static int gpio_irq_enabled = -1;
static volatile int pmu_suspended = 0;
} else
pmu_kind = PMU_UNKNOWN;
- via = (volatile unsigned char *) ioremap(vias->addrs->address, 0x2000);
+ via = ioremap(vias->addrs->address, 0x2000);
out_8(&via[IER], IER_CLR | 0x7f); /* disable all intrs */
out_8(&via[IFR], 0x7f); /* clear IFR */
static inline void
send_byte(int x)
{
- volatile unsigned char *v = via;
+ volatile unsigned char __iomem *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 *v = via;
+ volatile unsigned char __iomem *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;
- char *mem_ctrl;
- unsigned int *mem_ctrl_sleep;
+ void __iomem *mem_ctrl;
+ unsigned int __iomem *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 = (unsigned int *) (mem_ctrl + PB3400_MEM_CTRL_SLEEP);
+ mem_ctrl_sleep = 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 *via)
+polled_handshake(volatile unsigned char __iomem *via)
{
via[B] &= ~TREQ; eieio();
while ((via[B] & TACK) != 0)
}
static inline void __pmac
-polled_send_byte(volatile unsigned char *via, int x)
+polled_send_byte(volatile unsigned char __iomem *via, int x)
{
via[ACR] |= SR_OUT | SR_EXT; eieio();
via[SR] = x; eieio();
}
static inline int __pmac
-polled_recv_byte(volatile unsigned char *via)
+polled_recv_byte(volatile unsigned char __iomem *via)
{
int x;
{
unsigned long flags;
int i, l, c;
- volatile unsigned char *v = via;
+ volatile unsigned char __iomem *v = via;
req->complete = 1;
c = req->data[0];
int type;
const char *name;
int rev;
- volatile u32 *base;
+ volatile u32 __iomem *base;
unsigned long flags;
/* For use by macio_asic PCI driver */
extern struct macio_chip* macio_find(struct device_node* child, int type);
#define MACIO_FCR32(macio, r) ((macio)->base + ((r) >> 2))
-#define MACIO_FCR8(macio, r) (((volatile u8*)((macio)->base)) + (r))
+#define MACIO_FCR8(macio, r) (((volatile u8 __iomem *)((macio)->base)) + (r))
#define MACIO_IN32(r) (in_le32(MACIO_FCR32(macio,r)))
#define MACIO_OUT32(r,v) (out_le32(MACIO_FCR32(macio,r), (v)))