Commit 1b2b5244 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] misc sparc iomem annotations

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0c17d846
......@@ -28,7 +28,7 @@
#define APC_OBPNAME "power-management"
#define APC_DEVNAME "apc"
volatile static u8 *regs;
volatile static u8 __iomem *regs;
static int apc_regsize;
static int apc_no_idle __initdata = 0;
......@@ -70,7 +70,7 @@ void apc_swift_idle(void)
static inline void apc_free(void)
{
sbus_iounmap((unsigned long)regs, apc_regsize);
sbus_iounmap(regs, apc_regsize);
}
static int apc_open(struct inode *inode, struct file *f)
......@@ -155,9 +155,9 @@ static int __init apc_probe(void)
}
apc_regsize = sdev->reg_addrs[0].reg_size;
regs = (u8*) sbus_ioremap(&sdev->resource[0], 0,
regs = sbus_ioremap(&sdev->resource[0], 0,
apc_regsize, APC_OBPNAME);
if(NULL == regs) {
if(!regs) {
printk(KERN_ERR "%s: unable to map registers\n", APC_DEVNAME);
return -ENODEV;
}
......
......@@ -17,7 +17,7 @@
/* auxio_register is not static because it is referenced
* in entry.S::floppy_tdone
*/
unsigned long auxio_register = 0UL;
void __iomem *auxio_register = NULL;
static spinlock_t auxio_lock = SPIN_LOCK_UNLOCKED;
void __init auxio_probe(void)
......@@ -63,7 +63,7 @@ void __init auxio_probe(void)
/* Fix the address on sun4m and sun4c. */
if((((unsigned long) auxregs[0].phys_addr) & 3) == 3 ||
sparc_cpu_model == sun4c)
auxio_register |= 3;
auxio_register += (3 - ((unsigned long)auxio_register & 3));
set_auxio(AUXIO_LED, 0);
}
......
......@@ -30,7 +30,7 @@
#define PMC_IDLE_REG 0x00
#define PMC_IDLE_ON 0x01
volatile static u8 *regs;
volatile static u8 __iomem *regs;
static int pmc_regsize;
#define pmc_readb(offs) (sbus_readb(regs+offs))
......@@ -55,7 +55,7 @@ void pmc_swift_idle(void)
static inline void pmc_free(void)
{
sbus_iounmap((unsigned long)regs, pmc_regsize);
sbus_iounmap(regs, pmc_regsize);
}
static int __init pmc_probe(void)
......@@ -76,9 +76,9 @@ static int __init pmc_probe(void)
}
pmc_regsize = sdev->reg_addrs[0].reg_size;
regs = (u8*) sbus_ioremap(&sdev->resource[0], 0,
regs = sbus_ioremap(&sdev->resource[0], 0,
pmc_regsize, PMC_OBPNAME);
if(NULL == regs) {
if (!regs) {
printk(KERN_ERR "%s: unable to map registers\n", PMC_DEVNAME);
return -ENODEV;
}
......
......@@ -53,7 +53,7 @@ EXPORT_SYMBOL(jiffies_64);
spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
enum sparc_clock_type sp_clock_typ;
spinlock_t mostek_lock = SPIN_LOCK_UNLOCKED;
unsigned long mstk48t02_regs = 0UL;
void __iomem *mstk48t02_regs = NULL;
static struct mostek48t08 *mstk48t08_regs = NULL;
static int set_rtc_mmss(unsigned long);
static int sbus_do_settimeofday(struct timespec *tv);
......@@ -350,7 +350,7 @@ static __inline__ void clock_probe(void)
mstk48t08_regs = (struct mostek48t08 *) sbus_ioremap(&r, 0,
sizeof(struct mostek48t08), "mk48t08");
mstk48t02_regs = (unsigned long)&mstk48t08_regs->regs;
mstk48t02_regs = &mstk48t08_regs->regs;
} else {
prom_printf("CLOCK: Unknown model name '%s'\n",model);
prom_halt();
......
......@@ -57,8 +57,8 @@ struct bbc_i2c_bus {
struct bbc_i2c_bus *next;
int index;
spinlock_t lock;
void *i2c_bussel_reg;
void *i2c_control_regs;
void __iomem *i2c_bussel_reg;
void __iomem *i2c_control_regs;
unsigned char own, clock;
wait_queue_head_t wq;
......
......@@ -54,8 +54,8 @@ MODULE_LICENSE("GPL");
static spinlock_t riowd_lock = SPIN_LOCK_UNLOCKED;
static void *bbc_regs;
static void *riowd_regs;
static void __iomem *bbc_regs;
static void __iomem *riowd_regs;
#define WDTO_INDEX 0x05
static int riowd_timeout = 1; /* in minutes */
......
......@@ -51,7 +51,7 @@
struct uart_sunsab_port {
struct uart_port port; /* Generic UART port */
union sab82532_async_regs *regs; /* Chip registers */
union sab82532_async_regs __iomem *regs; /* Chip registers */
unsigned long irqflags; /* IRQ state flags */
int dsr; /* Current DSR state */
unsigned int cec_timeout; /* Chip poll timeout... */
......
......@@ -69,7 +69,7 @@ enum dvma_rev {
struct sbus_dma {
struct sbus_dma *next;
struct sbus_dev *sdev;
unsigned long regs;
void __iomem *regs;
/* Status, misc info */
int node; /* Prom node for this DMA device */
......
......@@ -53,9 +53,9 @@ struct fbtype {
struct fbcmap {
int index; /* first element (0 origin) */
int count;
unsigned char *red;
unsigned char *green;
unsigned char *blue;
unsigned char __user *red;
unsigned char __user *green;
unsigned char __user *blue;
};
#ifdef __KERNEL__
......
......@@ -38,8 +38,8 @@
* other than the control register are in binary coded decimal. Some
* control bits also live outside the control register.
*/
#define mostek_read(_addr) (*((volatile u8 *)(_addr)))
#define mostek_write(_addr,_val) ((*((volatile u8 *)(_addr))) = (_val))
#define mostek_read(_addr) readb(_addr)
#define mostek_write(_addr,_val) writeb(_val, _addr)
#define MOSTEK_EEPROM 0x0000UL
#define MOSTEK_IDPROM 0x07d8UL
#define MOSTEK_CREG 0x07f8UL
......@@ -65,7 +65,7 @@ struct mostek48t02 {
};
extern spinlock_t mostek_lock;
extern unsigned long mstk48t02_regs;
extern void __iomem *mstk48t02_regs;
/* Control register values. */
#define MSTK_CREG_WRITE 0x80 /* Must set this before placing values. */
......
......@@ -569,7 +569,7 @@ static void snd_cs4231_mce_down(cs4231_t *chip)
#endif
#ifdef CONFIG_SND_DEBUG
if (__cs4231_readb(chip, CS4231P(chip, REGSEL)) & CS4231_INIT)
snd_printk("mce_down [0x%lx] - auto calibration time out (0)\n", CS4231P(chip, REGSEL));
snd_printk("mce_down [%p] - auto calibration time out (0)\n", CS4231P(chip, REGSEL));
#endif
chip->mce_bit &= ~CS4231_MCE;
timeout = __cs4231_readb(chip, CS4231P(chip, REGSEL));
......@@ -1347,7 +1347,7 @@ static int snd_cs4231_probe(cs4231_t *chip)
break; /* this is valid value */
}
}
snd_printdd("cs4231: port = 0x%lx, id = 0x%x\n", chip->port, id);
snd_printdd("cs4231: port = %p, id = 0x%x\n", chip->port, id);
if (id != 0x0a)
return -ENODEV; /* no valid device found */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment