void __init time_init(void) { if (board_time_init) board_time_init(); clk_init(); rtc_sh_get_time(&xtime); set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec); #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST local_timer_setup(smp_processor_id()); #endif /* * Make sure all compiled-in early timers register themselves. * * 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. */ early_platform_driver_register_all("earlytimer"); early_platform_driver_probe("earlytimer", 2, 0); }
static void __init shmobile_late_time_init(void) { /* */ early_platform_driver_register_all("earlytimer"); early_platform_driver_probe("earlytimer", 2, 0); }
static void __init sh_late_time_init(void) { /* * Make sure all compiled-in early timers register themselves. * * 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. */ early_platform_driver_register_all("earlytimer"); early_platform_driver_probe("earlytimer", 2, 0); }
/** * omap2_dm_timer_early_init - top level early timer initialization * called in the last part of omap2_init_common_hw * * Uses dedicated hwmod api to parse through hwmod database for * given class name and then build and register the timer device. * At the end driver is registered and early probe initiated. */ void __init omap2_dm_timer_early_init(void) { int early_init = 1; /* identify early init in omap2_timer_init() */ int ret = omap_hwmod_for_each_by_class("timer", omap_timer_init, &early_init); if (unlikely(ret)) { pr_debug("%s: device registration FAILED!\n", __func__); return; } early_platform_driver_register_all("earlytimer"); early_platform_driver_probe("earlytimer", early_timer_count, 0); }
static void __init rk_timer_init(void) { early_platform_add_devices(rk_timer_devices, ARRAY_SIZE(rk_timer_devices)); early_platform_driver_register_all(TIMER_NAME); early_platform_driver_probe(TIMER_NAME, 1, 0); }