timer: arm: implement smp_timer_init
Implement smp_timer_init to initialize arch timer of secondary cores. Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
e6392301f8
commit
db71e4dac7
|
@ -135,3 +135,16 @@ void arch_busy_wait(uint32_t usec_to_wait)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
void smp_timer_init(void)
|
||||
{
|
||||
/*
|
||||
* set the initial status of timer0 of each secondary core
|
||||
*/
|
||||
arm_arch_timer_set_compare(arm_arch_timer_count() + CYC_PER_TICK);
|
||||
arm_arch_timer_enable(true);
|
||||
irq_enable(ARM_ARCH_TIMER_IRQ);
|
||||
arm_arch_timer_set_irq_mask(false);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue