aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/kernel/time_32.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-04-15 10:50:12 +0000
committerPaul Mundt <lethal@linux-sh.org>2009-04-19 13:06:24 +0900
commiteaab89197b733d0f81f07d6c44294b674479fda8 (patch)
tree790fa1ae9f6c250562137f0cdc578e284f077c88 /arch/sh/kernel/time_32.c
parente475eedb09ee9a0fd855f3e923aa9af31c17d141 (diff)
sh: arch earlytimer support
Extend the 32-bit SuperH timer code to register and probe the earlytimer class of Early Platform Drivers. This registers the sh_cmt driver if compiled-in. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/time_32.c')
-rw-r--r--arch/sh/kernel/time_32.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sh/kernel/time_32.c b/arch/sh/kernel/time_32.c
index c34e1e0f9b0..04b8c6ab166 100644
--- a/arch/sh/kernel/time_32.c
+++ b/arch/sh/kernel/time_32.c
@@ -17,6 +17,7 @@
#include <linux/sched.h>
#include <linux/clockchips.h>
#include <linux/mc146818rtc.h> /* for rtc_lock */
+#include <linux/platform_device.h>
#include <linux/smp.h>
#include <asm/clock.h>
#include <asm/rtc.h>
@@ -229,6 +230,14 @@ void __init time_init(void)
#endif
/*
+ * Make sure all compiled-in early timers register themselves.
+ * Run probe() for one "earlytimer" device.
+ */
+ early_platform_driver_register_all("earlytimer");
+ if (early_platform_driver_probe("earlytimer", 1, 0))
+ return;
+
+ /*
* Find the timer to use as the system timer, it will be
* initialized for us.
*/