Files

46 lines
1.2 KiB
C
Raw Permalink Normal View History

2018-12-28 00:32:24 -08:00
// SPDX-License-Identifier: GPL-2.0
2005-04-16 15:20:36 -07:00
/*
2009-05-08 16:44:00 +09:00
* arch/sh/kernel/time.c
2005-04-16 15:20:36 -07:00
*
* Copyright (C) 1999 Tetsuya Okada & Niibe Yutaka
* Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
* Copyright (C) 2002 - 2009 Paul Mundt
2005-04-16 15:20:36 -07:00
* Copyright (C) 2002 M. R. Brown <mrbrown@linux-sh.org>
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/profile.h>
2006-12-06 11:24:48 +09:00
#include <linux/timex.h>
#include <linux/sched.h>
#include <linux/clockchips.h>
2009-04-15 10:50:12 +00:00
#include <linux/platform_device.h>
2008-08-06 18:37:07 +09:00
#include <linux/smp.h>
2009-04-27 17:34:39 +09:00
#include <linux/rtc.h>
2006-01-16 22:14:17 -08:00
#include <asm/clock.h>
2005-04-16 15:20:36 -07:00
#include <asm/rtc.h>
#include <asm/platform_early.h>
2006-01-16 22:14:17 -08:00
static void __init sh_late_time_init(void)
2009-04-28 08:19:50 +00:00
{
/*
* Make sure all compiled-in early timers register themselves.
2009-06-14 20:02:30 +09:00
*
* Run probe() for two "earlytimer" devices, these will be the
* clockevents and clocksource devices respectively. In the event
* that only a clockevents device is available, we -ENODEV on the
* clocksource and the jiffies clocksource is used transparently
* instead. No error handling is necessary here.
*/
sh_early_platform_driver_register_all("earlytimer");
sh_early_platform_driver_probe("earlytimer", 2, 0);
2009-04-28 08:19:50 +00:00
}
2009-04-28 08:19:50 +00:00
void __init time_init(void)
{
2018-04-20 17:46:39 +02:00
timer_probe();
2009-04-28 08:19:50 +00:00
clk_init();
late_time_init = sh_late_time_init;
2009-04-28 08:19:50 +00:00
}