[PATCH 010/011] sh: add early platform support for earlytimer

From: Magnus Damm
Date: Fri Jan 23 2009 - 06:03:36 EST


From: Magnus Damm <damm@xxxxxxxxxx>

This patch adds early platform "earlytimer" class support.

Signed-off-by: Magnus Damm <damm@xxxxxxxxxx>
---

arch/sh/kernel/time_32.c | 11 +++++++++++
1 file changed, 11 insertions(+)

--- 0017/arch/sh/kernel/time_32.c
+++ work/arch/sh/kernel/time_32.c 2009-01-23 16:41:21.000000000 +0900
@@ -218,6 +218,8 @@ unsigned long long sched_clock(void)

void __init time_init(void)
{
+ int n;
+
if (board_time_init)
board_time_init();

@@ -236,6 +238,15 @@ void __init time_init(void)
* initialized for us.
*/
sys_timer = get_sys_timer();
+
+ /* Make sure all compiled-in early timers register themselves.
+ * Run probe() for one "earlytimer" device.
+ */
+ early_platform_driver_register_all("earlytimer");
+ n = early_platform_driver_probe("earlytimer", 1, 0);
+ if (n)
+ return;
+
if (sys_timer)
pr_info("Using %s for system timer\n", sys_timer->name);
else
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/