diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2005-04-22 00:42:34 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-04-22 00:42:34 -0400 |
commit | b4bca26c0160f48b4eb04f21d31a229832732013 (patch) | |
tree | b4a6d736fcb8664753066df3e6a93ed24c0f409b /include/asm-sparc64 | |
parent | d7be828e03969ea7f922f299acb8daa0d8ce7006 (diff) |
[SPARC]: Provide generic ioctls in Sparc RTC driver.
Provide support for drivers/char/rtc.c ioctls in the
Mostek rtc driver as well as the Sparc specific RTCGET
and RTCSET.
This allows userspace to be much less messy. Currently
util-linux and other spots jump through hoops trying
various ioctl variants until it hits the right one whatever
driver actually being used supports.
Eventually all of this should move over to the genrtc.c
driver, but not today...
While we are here, fix up the register types for sparse.
Thanks to Frans Pop for helping point out this issue.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r-- | include/asm-sparc64/mostek.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-sparc64/mostek.h b/include/asm-sparc64/mostek.h index ccf2f5f82d7f..1f9b1356a48e 100644 --- a/include/asm-sparc64/mostek.h +++ b/include/asm-sparc64/mostek.h | |||
@@ -38,7 +38,7 @@ | |||
38 | * | 38 | * |
39 | * We now deal with physical addresses for I/O to the chip. -DaveM | 39 | * We now deal with physical addresses for I/O to the chip. -DaveM |
40 | */ | 40 | */ |
41 | static __inline__ u8 mostek_read(unsigned long addr) | 41 | static __inline__ u8 mostek_read(void * __iomem addr) |
42 | { | 42 | { |
43 | u8 ret; | 43 | u8 ret; |
44 | 44 | ||
@@ -48,7 +48,7 @@ static __inline__ u8 mostek_read(unsigned long addr) | |||
48 | return ret; | 48 | return ret; |
49 | } | 49 | } |
50 | 50 | ||
51 | static __inline__ void mostek_write(unsigned long addr, u8 val) | 51 | static __inline__ void mostek_write(void * __iomem addr, u8 val) |
52 | { | 52 | { |
53 | __asm__ __volatile__("stba %0, [%1] %2" | 53 | __asm__ __volatile__("stba %0, [%1] %2" |
54 | : /* no outputs */ | 54 | : /* no outputs */ |
@@ -67,7 +67,7 @@ static __inline__ void mostek_write(unsigned long addr, u8 val) | |||
67 | #define MOSTEK_YEAR 0x07ffUL | 67 | #define MOSTEK_YEAR 0x07ffUL |
68 | 68 | ||
69 | extern spinlock_t mostek_lock; | 69 | extern spinlock_t mostek_lock; |
70 | extern unsigned long mstk48t02_regs; | 70 | extern void *__iomem mstk48t02_regs; |
71 | 71 | ||
72 | /* Control register values. */ | 72 | /* Control register values. */ |
73 | #define MSTK_CREG_WRITE 0x80 /* Must set this before placing values. */ | 73 | #define MSTK_CREG_WRITE 0x80 /* Must set this before placing values. */ |