]>
Commit | Line | Data |
---|---|---|
5933f6d2 | 1 | // SPDX-License-Identifier: GPL-2.0 |
1da177e4 | 2 | /* |
5ac54964 | 3 | * arch/sh/kernel/time.c |
1da177e4 LT |
4 | * |
5 | * Copyright (C) 1999 Tetsuya Okada & Niibe Yutaka | |
6 | * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org> | |
42786006 | 7 | * Copyright (C) 2002 - 2009 Paul Mundt |
1da177e4 | 8 | * Copyright (C) 2002 M. R. Brown <mrbrown@linux-sh.org> |
1da177e4 | 9 | */ |
1da177e4 | 10 | #include <linux/kernel.h> |
1da177e4 | 11 | #include <linux/init.h> |
1da177e4 | 12 | #include <linux/profile.h> |
65e5d90d PM |
13 | #include <linux/timex.h> |
14 | #include <linux/sched.h> | |
57be2b48 | 15 | #include <linux/clockchips.h> |
eaab8919 | 16 | #include <linux/platform_device.h> |
8c24594d | 17 | #include <linux/smp.h> |
47c8a08b | 18 | #include <linux/rtc.h> |
36ddf31b | 19 | #include <asm/clock.h> |
1da177e4 | 20 | #include <asm/rtc.h> |
36ddf31b | 21 | |
82b24221 | 22 | static void __init sh_late_time_init(void) |
8e0b8429 | 23 | { |
1d29ebeb PM |
24 | /* |
25 | * Make sure all compiled-in early timers register themselves. | |
6fe32a46 PM |
26 | * |
27 | * Run probe() for two "earlytimer" devices, these will be the | |
28 | * clockevents and clocksource devices respectively. In the event | |
29 | * that only a clockevents device is available, we -ENODEV on the | |
30 | * clocksource and the jiffies clocksource is used transparently | |
31 | * instead. No error handling is necessary here. | |
1d29ebeb PM |
32 | */ |
33 | early_platform_driver_register_all("earlytimer"); | |
6fe32a46 | 34 | early_platform_driver_probe("earlytimer", 2, 0); |
8e0b8429 | 35 | } |
82b24221 | 36 | |
8e0b8429 MD |
37 | void __init time_init(void) |
38 | { | |
19f48591 | 39 | timer_probe(); |
8e0b8429 MD |
40 | |
41 | clk_init(); | |
42 | ||
82b24221 | 43 | late_time_init = sh_late_time_init; |
8e0b8429 | 44 | } |