From: Magnus Damm Date: Wed, 15 Apr 2009 10:50:12 +0000 (+0000) Subject: sh: arch earlytimer support X-Git-Tag: v2.6.31-rc1~392^2~41^2~129^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=eaab89197b733d0f81f07d6c44294b674479fda8;p=karo-tx-linux.git 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 Signed-off-by: Paul Mundt --- diff --git a/arch/sh/kernel/time_32.c b/arch/sh/kernel/time_32.c index c34e1e0f9b02..04b8c6ab1667 100644 --- a/arch/sh/kernel/time_32.c +++ b/arch/sh/kernel/time_32.c @@ -17,6 +17,7 @@ #include #include #include /* for rtc_lock */ +#include #include #include #include @@ -228,6 +229,14 @@ void __init time_init(void) local_timer_setup(smp_processor_id()); #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.