Merge tag 'pci-v6.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
[linux-block.git] / arch / sh / kernel / time.c
CommitLineData
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>
507fd01d 21#include <asm/platform_early.h>
36ddf31b 22
82b24221 23static void __init sh_late_time_init(void)
8e0b8429 24{
1d29ebeb
PM
25 /*
26 * Make sure all compiled-in early timers register themselves.
6fe32a46
PM
27 *
28 * Run probe() for two "earlytimer" devices, these will be the
29 * clockevents and clocksource devices respectively. In the event
30 * that only a clockevents device is available, we -ENODEV on the
31 * clocksource and the jiffies clocksource is used transparently
32 * instead. No error handling is necessary here.
1d29ebeb 33 */
201e9109
BG
34 sh_early_platform_driver_register_all("earlytimer");
35 sh_early_platform_driver_probe("earlytimer", 2, 0);
8e0b8429 36}
82b24221 37
8e0b8429
MD
38void __init time_init(void)
39{
19f48591 40 timer_probe();
8e0b8429
MD
41
42 clk_init();
43
82b24221 44 late_time_init = sh_late_time_init;
8e0b8429 45}