void __init time_init(void) { if (board_time_init) board_time_init(); clk_init(); if (rtc_get_time) { rtc_get_time(&xtime); } else { xtime.tv_sec = mktime(2000, 1, 1, 0, 0, 0); xtime.tv_nsec = 0; } set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec); /* * Find the timer to use as the system timer, it will be * initialized for us. */ sys_timer = get_sys_timer(); printk(KERN_INFO "Using %s for system timer\n", sys_timer->name); #if defined(CONFIG_SH_KGDB) /* * Set up kgdb as requested. We do it here because the serial * init uses the timer vars we just set up for figuring baud. */ kgdb_init(); #endif }
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 /* * Find the timer to use as the system timer, it will be * initialized for us. */ sys_timer = get_sys_timer(); if (unlikely(!sys_timer)) panic("System timer missing.\n"); printk(KERN_INFO "Using %s for system timer\n", sys_timer->name); }
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 /* * Find the timer to use as the system timer, it will be * initialized for us. */ sys_timer = get_sys_timer(); printk(KERN_INFO "Using %s for system timer\n", sys_timer->name); if (sys_timer->ops->read) clocksource_sh.read = sys_timer->ops->read; init_sh_clocksource(); if (sh_hpt_frequency) printk("Using %lu.%03lu MHz high precision timer.\n", ((sh_hpt_frequency + 500) / 1000) / 1000, ((sh_hpt_frequency + 500) / 1000) % 1000); }
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); /* * Find the timer to use as the system timer, it will be * initialized for us. */ sys_timer = get_sys_timer(); printk(KERN_INFO "Using %s for system timer\n", sys_timer->name); if (sys_timer->ops->read) clocksource_sh.read = sys_timer->ops->read; init_sh_clocksource(); if (sh_hpt_frequency) printk("Using %lu.%03lu MHz high precision timer.\n", ((sh_hpt_frequency + 500) / 1000) / 1000, ((sh_hpt_frequency + 500) / 1000) % 1000); #if defined(CONFIG_SH_KGDB) /* * Set up kgdb as requested. We do it here because the serial * init uses the timer vars we just set up for figuring baud. */ kgdb_init(); #endif }