diff options
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/kernel/time.c | 11 |
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 | ||
76 | void __init time_init(void) | 76 | void 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 | ||
92 | void __init time_init(void) | ||
93 | { | ||
91 | mach_sched_init(timer_interrupt); | 94 | mach_sched_init(timer_interrupt); |
92 | } | 95 | } |
93 | 96 | ||