X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-sparc%2Fmostek.h;h=c6022a5d611daee76ff1ca038bcb9db514fe4a16;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=be60a9afa41fd4c4ad1bce30ce663c65e88243c5;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/asm-sparc/mostek.h b/include/asm-sparc/mostek.h index be60a9afa..c6022a5d6 100644 --- a/include/asm-sparc/mostek.h +++ b/include/asm-sparc/mostek.h @@ -11,6 +11,7 @@ #include #include +#include /* M48T02 Register Map (adapted from Sun NVRAM/Hostid FAQ) * @@ -38,8 +39,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 +66,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. */