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>
This commit is contained in:
Родитель
e475eedb09
Коммит
eaab89197b
|
@ -17,6 +17,7 @@
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/clockchips.h>
|
#include <linux/clockchips.h>
|
||||||
#include <linux/mc146818rtc.h> /* for rtc_lock */
|
#include <linux/mc146818rtc.h> /* for rtc_lock */
|
||||||
|
#include <linux/platform_device.h>
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
#include <asm/clock.h>
|
#include <asm/clock.h>
|
||||||
#include <asm/rtc.h>
|
#include <asm/rtc.h>
|
||||||
|
@ -228,6 +229,14 @@ void __init time_init(void)
|
||||||
local_timer_setup(smp_processor_id());
|
local_timer_setup(smp_processor_id());
|
||||||
#endif
|
#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
|
* Find the timer to use as the system timer, it will be
|
||||||
* initialized for us.
|
* initialized for us.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче