target/imx: reload cmp timer outside of the reload ptimer transaction
cover target/imx: reload cmp timer outside of the reload ptimer transaction
When testing with seL4 and a timer driver, without this patch the the interrupt takes up to a minute to arrived when the timer is set to fire after 1 second. This patch fixes the timer interrupt triggering.
regards, Axel
Axel Heider (1):
target/imx: reload cmp timer outside of the reload ptimer transaction
hw/timer/imx_epit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.4
PATCH 1/1 target/imx: reload cmp timer outside of the reload ptimer transaction
From: Axel Heider <[email protected]>
Signed-off-by Axel Heider <[email protected]>
--- hw/timer/imx_epit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
hw/timer/imx_epit.c +4 -1
@@ -276,9 +276,12 @@ static void imx_epit_write(void *opaque, hwaddr offset, uint64_t value,ptimer_set_count (s->timer_reload, s->lr); } +// commit s->timer_reload before imx_epit_reload_compare_timer +// as timer_reload is read in imx_epit_reload_compare_timer +ptimer_transaction_commit (s->timer_reload); +imx_epit_reload_compare_timer (s);ptimer_transaction_commit (s->timer_cmp); -ptimer_transaction_commit (s->timer_reload);break ;case 3 :/* CMP */
Signature · 1 line
2.34.4