diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-08-03 01:19:58 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-09-20 22:57:47 -0400 |
commit | ad89f87a84040a57c4a78ca2759b364f72f423ab (patch) | |
tree | a34207175da4338cc8e4e7b7ea323193e199eb3c /include/asm-sh | |
parent | 7da3b8ef662af6252aa17c55cc0aa6d74cbf02e4 (diff) |
rtc: rtc-sh: Support 4-digit year on SH7705/SH7710/SH7712.
All SH-4 parts have a 4-digit year, while the SH-3 parts typically
only use a 2-digit one. The SH7705, SH7710, and SH7712 SH-3 parts
however opted to extend it to 4-digit and still look and act like
an SH-3 RTC in all other ways.
This adds a capability flag (RTC_CAP_4_DIGIT_YEAR) that these
corner-case CPU subtypes can set in their platform data and cleans
up some of the ifdef mess in the driver as a result.
Reported-by: Markus Brunner <super.firetwister@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r-- | include/asm-sh/rtc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-sh/rtc.h b/include/asm-sh/rtc.h index 91aacc96151b..858da99d37e0 100644 --- a/include/asm-sh/rtc.h +++ b/include/asm-sh/rtc.h | |||
@@ -5,4 +5,10 @@ extern void (*board_time_init)(void); | |||
5 | extern void (*rtc_sh_get_time)(struct timespec *); | 5 | extern void (*rtc_sh_get_time)(struct timespec *); |
6 | extern int (*rtc_sh_set_time)(const time_t); | 6 | extern int (*rtc_sh_set_time)(const time_t); |
7 | 7 | ||
8 | #define RTC_CAP_4_DIGIT_YEAR (1 << 0) | ||
9 | |||
10 | struct sh_rtc_platform_info { | ||
11 | unsigned long capabilities; | ||
12 | }; | ||
13 | |||
8 | #endif /* _ASM_RTC_H */ | 14 | #endif /* _ASM_RTC_H */ |