aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorJohn Stultz <johnstul@us.ibm.com>2010-03-03 22:57:26 -0500
committerThomas Gleixner <tglx@linutronix.de>2010-03-12 19:14:13 -0500
commitffbcad49e79cd82428010b44a87401446ea7f370 (patch)
tree1543092ca1a359fb010c565fd7cc41563a8642c0 /arch/m68k
parent944694716d6ea3c274a73c830bf33e194bad4bcd (diff)
m68k: Convert m68k to use read/update_persistent_clock
This patch converts the m68k 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. I have not built or tested this patch, so help from arch maintainers would be appreciated. Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Andrew Morton <akpm@linux-foundation.org> LKML-Reference: <1267675049-12337-12-git-send-email-johnstul@us.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/kernel/time.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 17dc2a31a7ca..4926b3856c15 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -73,21 +73,24 @@ static irqreturn_t timer_interrupt(int irq, void *dummy)
73 return IRQ_HANDLED; 73 return IRQ_HANDLED;
74} 74}
75 75
76void __init time_init(void) 76void read_persistent_clock(struct timespec *ts)
77{ 77{
78 struct rtc_time time; 78 struct rtc_time time;
79 ts->tv_sec = 0;
80 ts->tv_nsec = 0;
79 81
80 if (mach_hwclk) { 82 if (mach_hwclk) {
81 mach_hwclk(0, &time); 83 mach_hwclk(0, &time);
82 84
83 if ((time.tm_year += 1900) < 1970) 85 if ((time.tm_year += 1900) < 1970)
84 time.tm_year += 100; 86 time.tm_year += 100;
85 xtime.tv_sec = mktime(time.tm_year, time.tm_mon, time.tm_mday, 87 ts->tv_sec = mktime(time.tm_year, time.tm_mon, time.tm_mday,
86 time.tm_hour, time.tm_min, time.tm_sec); 88 time.tm_hour, time.tm_min, time.tm_sec);
87 xtime.tv_nsec = 0;
88 } 89 }
89 wall_to_monotonic.tv_sec = -xtime.tv_sec; 90}
90 91
92void __init time_init(void)
93{
91 mach_sched_init(timer_interrupt); 94 mach_sched_init(timer_interrupt);
92} 95}
93 96