2005-04-16 16:20:36 -06:00
|
|
|
/*
|
2009-05-08 01:44:00 -06:00
|
|
|
* arch/sh/kernel/time.c
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* Copyright (C) 1999 Tetsuya Okada & Niibe Yutaka
|
|
|
|
* Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
|
2009-04-28 08:12:10 -06:00
|
|
|
* Copyright (C) 2002 - 2009 Paul Mundt
|
2005-04-16 16:20:36 -06:00
|
|
|
* Copyright (C) 2002 M. R. Brown <mrbrown@linux-sh.org>
|
|
|
|
*
|
2009-05-08 01:44:00 -06:00
|
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
|
|
* for more details.
|
2005-04-16 16:20:36 -06:00
|
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/profile.h>
|
2006-12-05 19:24:48 -07:00
|
|
|
#include <linux/timex.h>
|
|
|
|
#include <linux/sched.h>
|
2007-05-09 02:33:24 -06:00
|
|
|
#include <linux/clockchips.h>
|
2009-04-15 04:50:12 -06:00
|
|
|
#include <linux/platform_device.h>
|
2008-08-06 03:37:07 -06:00
|
|
|
#include <linux/smp.h>
|
2009-04-27 02:34:39 -06:00
|
|
|
#include <linux/rtc.h>
|
2006-01-16 23:14:17 -07:00
|
|
|
#include <asm/clock.h>
|
2005-04-16 16:20:36 -06:00
|
|
|
#include <asm/rtc.h>
|
2006-01-16 23:14:17 -07:00
|
|
|
|
2009-07-29 07:43:58 -06:00
|
|
|
static void __init sh_late_time_init(void)
|
2009-04-28 02:19:50 -06:00
|
|
|
{
|
2009-06-14 04:45:40 -06:00
|
|
|
/*
|
|
|
|
* Make sure all compiled-in early timers register themselves.
|
2009-06-14 05:02:30 -06: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.
|
2009-06-14 04:45:40 -06:00
|
|
|
*/
|
|
|
|
early_platform_driver_register_all("earlytimer");
|
2009-06-14 05:02:30 -06:00
|
|
|
early_platform_driver_probe("earlytimer", 2, 0);
|
2009-04-28 02:19:50 -06:00
|
|
|
}
|
2009-07-29 07:43:58 -06:00
|
|
|
|
2009-04-28 02:19:50 -06:00
|
|
|
void __init time_init(void)
|
|
|
|
{
|
2018-04-20 09:46:39 -06:00
|
|
|
timer_probe();
|
2009-04-28 02:19:50 -06:00
|
|
|
|
|
|
|
clk_init();
|
|
|
|
|
2009-07-29 07:43:58 -06:00
|
|
|
late_time_init = sh_late_time_init;
|
2009-04-28 02:19:50 -06:00
|
|
|
}
|