/* caculate the mult/shift by clock rate to gain more accratury */ if (clocksource_register_hz(&hi3518_clocksource, rate)) panic("register clocksouce :%s error\n", hi3518_clocksource.name);
/* force check the mult/shift of clocksource */ init_fixed_sched_clock(&cd, hi3518_update_sched_clock, 32, rate, hi3518_clocksource.mult, hi3518_clocksource.shift);
return 0; }
static void __init hi3518_timer_init(void) { unsigned int val;
edb_trace();
/* set timer clock source */ val = readl(SYS_CTL_VIRT + REG_SC_CTRL); val |= ((1<<16) | (1<<18) | (1<<20)); writel(val, SYS_CTL_VIRT + REG_SC_CTRL);