diff options
author | Xunlei Pang <pang.xunlei@linaro.org> | 2015-06-12 06:10:17 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-06-25 02:13:43 +0300 |
commit | 460ea8d70db1ffd9a5d6996c240c34458473334f (patch) | |
tree | 2c487bc17c7334a0d59de075830911c9335de919 /arch/sparc/kernel | |
parent | 9c5150b31b49e3d89c52df9b1c1ebcea4e665ec3 (diff) | |
download | linux-460ea8d70db1ffd9a5d6996c240c34458473334f.tar.xz |
sparc: time: Replace update_persistent_clock() with CONFIG_RTC_SYSTOHC
On Sparc systems, update_persistent_clock() uses RTC drivers to do
the job, it makes more sense to hand it over to CONFIG_RTC_SYSTOHC.
In the long run, all the update_persistent_clock() should migrate to
proper class RTC drivers if any and use CONFIG_RTC_SYSTOHC instead.
Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/time_32.c | 21 | ||||
-rw-r--r-- | arch/sparc/kernel/time_64.c | 14 |
2 files changed, 0 insertions, 35 deletions
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index 8caf45ee81d9..c9692f387cee 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c @@ -23,7 +23,6 @@ #include <linux/mm.h> #include <linux/interrupt.h> #include <linux/time.h> -#include <linux/rtc.h> #include <linux/rtc/m48t59.h> #include <linux/timex.h> #include <linux/clocksource.h> @@ -65,8 +64,6 @@ DEFINE_PER_CPU(struct clock_event_device, sparc32_clockevent); DEFINE_SPINLOCK(rtc_lock); EXPORT_SYMBOL(rtc_lock); -static int set_rtc_mmss(unsigned long); - unsigned long profile_pc(struct pt_regs *regs) { extern char __copy_user_begin[], __copy_user_end[]; @@ -87,11 +84,6 @@ EXPORT_SYMBOL(profile_pc); volatile u32 __iomem *master_l10_counter; -int update_persistent_clock(struct timespec now) -{ - return set_rtc_mmss(now.tv_sec); -} - irqreturn_t notrace timer_interrupt(int dummy, void *dev_id) { if (timer_cs_enabled) { @@ -362,16 +354,3 @@ void __init time_init(void) sbus_time_init(); } - -static int set_rtc_mmss(unsigned long secs) -{ - struct rtc_device *rtc = rtc_class_open("rtc0"); - int err = -1; - - if (rtc) { - err = rtc_set_mmss(rtc, secs); - rtc_class_close(rtc); - } - - return err; -} diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index edbbeb157d46..2e6035c0a8ca 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c @@ -28,7 +28,6 @@ #include <linux/cpufreq.h> #include <linux/percpu.h> #include <linux/miscdevice.h> -#include <linux/rtc.h> #include <linux/rtc/m48t59.h> #include <linux/kernel_stat.h> #include <linux/clockchips.h> @@ -394,19 +393,6 @@ static struct sparc64_tick_ops hbtick_operations __read_mostly = { static unsigned long timer_ticks_per_nsec_quotient __read_mostly; -int update_persistent_clock(struct timespec now) -{ - struct rtc_device *rtc = rtc_class_open("rtc0"); - int err = -1; - - if (rtc) { - err = rtc_set_mmss(rtc, now.tv_sec); - rtc_class_close(rtc); - } - - return err; -} - unsigned long cmos_regs; EXPORT_SYMBOL(cmos_regs); |