generc_timer: enable only once for mcs/non-mcs

Enable the timer only at initialization and since it is always
enabled. It is not needed to be re-enabled.

Signed-off-by: JorgeMVP <jorgepereira89@gmail.com>
This commit is contained in:
JorgeMVP 2023-05-18 20:23:35 +02:00 committed by Kent McLeod
parent 62c8148268
commit b544529615
2 changed files with 1 additions and 2 deletions

View file

@ -43,7 +43,6 @@ static inline void ackDeadlineIRQ(void)
static inline void resetTimer(void)
{
SYSTEM_WRITE_WORD(CNT_TVAL, TIMER_RELOAD);
SYSTEM_WRITE_WORD(CNT_CTL, BIT(0));
/* Ensure that the timer deasserts the IRQ before GIC EOIR/DIR.
* This is sufficient to remove the pending state from the GICR
* and avoid the interrupt happening twice because of the level

View file

@ -26,10 +26,10 @@ BOOT_CODE void initGenericTimer(void)
#ifdef CONFIG_KERNEL_MCS
/* this sets the irq to UINT64_MAX */
ackDeadlineIRQ();
SYSTEM_WRITE_WORD(CNT_CTL, BIT(0));
#else /* CONFIG_KERNEL_MCS */
resetTimer();
#endif /* !CONFIG_KERNEL_MCS */
SYSTEM_WRITE_WORD(CNT_CTL, BIT(0));
}
/*