mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
m68k: Hook up rtc-generic
m68k has been a long time user of the generic RTC abstraction, so hook up rtc-generic: - Create the "rtc-generic" platform device if mach_hwclk is set, - Add checks for mach_hwclk, in anticipation of RTC chip drivers being moved to drivers/rtc/. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
This commit is contained in:
parent
3afe6d0462
commit
2ceb3ad705
3 changed files with 24 additions and 3 deletions
|
@ -36,13 +36,16 @@ static inline unsigned int get_rtc_time(struct rtc_time *time)
|
|||
* 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);
|
||||
if (mach_hwclk)
|
||||
mach_hwclk(0, time);
|
||||
return RTC_24H;
|
||||
}
|
||||
|
||||
static inline int set_rtc_time(struct rtc_time *time)
|
||||
{
|
||||
return mach_hwclk(1, time);
|
||||
if (mach_hwclk)
|
||||
return mach_hwclk(1, time);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline unsigned int get_rtc_ss(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue