/* * Sets up the system clock */ int timer_calibration(void) { freq_hz = get_cntfrq(); LOG_INFO("aarch64_timer: frequency %d KHz\n", freq_hz / 1000); irq_install_handler(INT_PPI_NSPHYS_TIMER, timer_handler); #ifndef DYNAMIC_TICKS restart_periodic_timer(); #endif return 0; }
void udelay(unsigned long usec) { delay((u64)usec * get_cntfrq() / 1000000); }