Commit 0272282f authored by John Stultz's avatar John Stultz Committed by Paul Mundt

sh: Convert sh to use read/update_persistent_clock

This patch converts the sh architecture to use the generic
read_persistent_clock and update_persistent_clock interfaces, reducing
the amount of arch specific code we have to maintain, and allowing for
further cleanups in the future.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJohn Stultz <johnstul@us.ibm.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 62c8cbbf
...@@ -39,12 +39,12 @@ static int null_rtc_set_time(const time_t secs) ...@@ -39,12 +39,12 @@ static int null_rtc_set_time(const time_t secs)
void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time; void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time;
int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time; int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time;
#ifdef CONFIG_GENERIC_CMOS_UPDATE
void read_persistent_clock(struct timespec *ts) void read_persistent_clock(struct timespec *ts)
{ {
rtc_sh_get_time(ts); rtc_sh_get_time(ts);
} }
#ifdef CONFIG_GENERIC_CMOS_UPDATE
int update_persistent_clock(struct timespec now) int update_persistent_clock(struct timespec now)
{ {
return rtc_sh_set_time(now.tv_sec); return rtc_sh_set_time(now.tv_sec);
...@@ -113,9 +113,5 @@ void __init time_init(void) ...@@ -113,9 +113,5 @@ void __init time_init(void)
hwblk_init(); hwblk_init();
clk_init(); clk_init();
rtc_sh_get_time(&xtime);
set_normalized_timespec(&wall_to_monotonic,
-xtime.tv_sec, -xtime.tv_nsec);
late_time_init = sh_late_time_init; late_time_init = sh_late_time_init;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment