timer: xtensa: restore smp_timer_init()

The smp_timer_init() was removed during timer re-write.
This results in undefined references error during compilation
when CONFIG_SMP=y. So add it back so we can compile for SMP.
The logic is updated from the previous version to the latest
in the driver.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2019-01-28 09:12:13 -08:00 committed by Anas Nashif
commit d0ad419737

View file

@ -118,3 +118,11 @@ u32_t _timer_cycle_get_32(void)
{
return ccount();
}
#ifdef CONFIG_SMP
void smp_timer_init(void)
{
set_ccompare(ccount() + CYC_PER_TICK);
irq_enable(TIMER_IRQ);
}
#endif