mirror of
https://github.com/apache/nuttx.git
synced 2026-09-03 07:33:00 +00:00
arm/trustzone: time interrupt setting failed
we should use a secure clock when the CPU is in secure mode Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
024440663d
commit
e3f481d3b1
1 changed files with 5 additions and 0 deletions
|
|
@ -275,8 +275,13 @@ 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
|
||||
irq_attach(GIC_IRQ_SEPTM, arm_timer_interrupt, lower);
|
||||
up_enable_irq(GIC_IRQ_SEPTM);
|
||||
#else
|
||||
irq_attach(GIC_IRQ_PTM, arm_timer_interrupt, lower);
|
||||
up_enable_irq(GIC_IRQ_PTM);
|
||||
#endif
|
||||
|
||||
return (struct oneshot_lowerhalf_s *)lower;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue