mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[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 <[email protected]>
This commit is contained in:
parent
d7be828e03
commit
b4bca26c01
3 changed files with 123 additions and 23 deletions
|
|
@ -38,7 +38,7 @@
|
|||
*
|
||||
* We now deal with physical addresses for I/O to the chip. -DaveM
|
||||
*/
|
||||
static __inline__ u8 mostek_read(unsigned long addr)
|
||||
static __inline__ u8 mostek_read(void * __iomem addr)
|
||||
{
|
||||
u8 ret;
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ static __inline__ u8 mostek_read(unsigned long addr)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static __inline__ void mostek_write(unsigned long addr, u8 val)
|
||||
static __inline__ void mostek_write(void * __iomem addr, u8 val)
|
||||
{
|
||||
__asm__ __volatile__("stba %0, [%1] %2"
|
||||
: /* no outputs */
|
||||
|
|
@ -67,7 +67,7 @@ static __inline__ void mostek_write(unsigned long addr, u8 val)
|
|||
#define MOSTEK_YEAR 0x07ffUL
|
||||
|
||||
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. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue