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
1 changed files with 13 additions and 0 deletions
|
@ -135,3 +135,16 @@ void arch_busy_wait(uint32_t usec_to_wait)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#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…
Add table
Add a link
Reference in a new issue