arch/timer: frequency 0 should not be set
Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
d8e1022b6f
commit
b82ccd6621
@ -264,10 +264,13 @@ struct oneshot_lowerhalf_s *arm_timer_initialize(unsigned int freq)
|
||||
{
|
||||
freq = arm_timer_get_freq();
|
||||
}
|
||||
else
|
||||
{
|
||||
arm_timer_set_freq(freq);
|
||||
}
|
||||
|
||||
lower->lh.ops = &g_arm_timer_ops;
|
||||
lower->freq = freq;
|
||||
arm_timer_set_freq(freq);
|
||||
|
||||
/* Enable timer, but disable interrupt */
|
||||
|
||||
@ -275,7 +278,7 @@ struct oneshot_lowerhalf_s *arm_timer_initialize(unsigned int freq)
|
||||
ctrl |= ARM_TIMER_CTRL_ENABLE | ARM_TIMER_CTRL_INT_MASK;
|
||||
arm_timer_set_ctrl(ctrl);
|
||||
|
||||
#ifdef CONFIG_ARCH_TRUSTZONE_SECURE
|
||||
#if defined(CONFIG_ARCH_TRUSTZONE_SECURE) || defined(CONFIG_ARCH_TRUSTZONE_BOTH)
|
||||
irq_attach(GIC_IRQ_SEPTM, arm_timer_interrupt, lower);
|
||||
up_enable_irq(GIC_IRQ_SEPTM);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user