diff options
| author | Geert Uytterhoeven <geert@linux-m68k.org> | 2002-11-02 23:51:56 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-11-02 23:51:56 -0800 |
| commit | a7e1a5d8b475f892b5f2fe3d64b61804ce1f0b1e (patch) | |
| tree | d757010dbad3cc9629592a7f412116308f0b2bbe /include | |
| parent | 78435629df60053764d3a5b68d58d9d4e96cf628 (diff) | |
[PATCH] M68k genrtc updates
Genrtc updates:
- Add genrtc wrappers
- Export mach_hwclk for modular genrtc
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-m68k/rtc.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/asm-m68k/rtc.h b/include/asm-m68k/rtc.h index b28f54735a72..674d7ccf8001 100644 --- a/include/asm-m68k/rtc.h +++ b/include/asm-m68k/rtc.h @@ -33,6 +33,36 @@ extern void gen_rtc_interrupt(unsigned long); #define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */ #define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */ +static inline void get_rtc_time(struct rtc_time *time) +{ + /* + * Only the values that we read from the RTC are set. We leave + * tm_wday, tm_yday and tm_isdst untouched. Even though the + * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated + * by the RTC when initially set to a non-zero value. + */ + mach_hwclk(0, time); +} + +static inline int set_rtc_time(struct rtc_time *time) +{ + return mach_hwclk(1, time); +} + +static inline int get_rtc_pll(struct rtc_pll_info *pll) +{ + if (mach_get_rtc_pll) + return mach_get_rtc_pll(pll); + else + return -EINVAL; +} +static inline int set_rtc_pll(struct rtc_pll_info *pll) +{ + if (mach_set_rtc_pll) + return mach_set_rtc_pll(pll); + else + return -EINVAL; +} #endif /* __KERNEL__ */ |
