diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-02-13 01:47:55 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-03-01 12:49:33 +0300 |
commit | a0151062ead35b3cc100a2b99b5c87b700ee52c0 (patch) | |
tree | c009907fa37ca9a9be87728012e61e7c8446d0c7 /drivers/rtc/rtc-tx4939.c | |
parent | d7ca4299d7c035969652596f0daa76407f6cfbdd (diff) | |
download | linux-a0151062ead35b3cc100a2b99b5c87b700ee52c0.tar.xz |
rtc: tx4939: remove arch/mips dependency
Copy RTC definitions from arch/mips/include/asm/txx9/tx4939.h to the RTC
driver so it doesn't depend on arch/mips anymore.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-tx4939.c')
-rw-r--r-- | drivers/rtc/rtc-tx4939.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c index 560d9a5e0225..1f4013d8ae7b 100644 --- a/drivers/rtc/rtc-tx4939.c +++ b/drivers/rtc/rtc-tx4939.c @@ -14,7 +14,30 @@ #include <linux/module.h> #include <linux/io.h> #include <linux/gfp.h> -#include <asm/txx9/tx4939.h> + +#define TX4939_RTCCTL_ALME 0x00000080 +#define TX4939_RTCCTL_ALMD 0x00000040 +#define TX4939_RTCCTL_BUSY 0x00000020 + +#define TX4939_RTCCTL_COMMAND 0x00000007 +#define TX4939_RTCCTL_COMMAND_NOP 0x00000000 +#define TX4939_RTCCTL_COMMAND_GETTIME 0x00000001 +#define TX4939_RTCCTL_COMMAND_SETTIME 0x00000002 +#define TX4939_RTCCTL_COMMAND_GETALARM 0x00000003 +#define TX4939_RTCCTL_COMMAND_SETALARM 0x00000004 + +#define TX4939_RTCTBC_PM 0x00000080 +#define TX4939_RTCTBC_COMP 0x0000007f + +#define TX4939_RTC_REG_RAMSIZE 0x00000100 +#define TX4939_RTC_REG_RWBSIZE 0x00000006 + +struct tx4939_rtc_reg { + __u32 ctl; + __u32 adr; + __u32 dat; + __u32 tbc; +}; struct tx4939rtc_plat_data { struct rtc_device *rtc; |