[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH qemu.git 1/1] target/imx: reload cmp timer outside of the reload
From: |
~axelheider |
Subject: |
[PATCH qemu.git 1/1] target/imx: reload cmp timer outside of the reload ptimer transaction |
Date: |
Wed, 19 Oct 2022 15:09:50 +0200 |
From: Axel Heider <axel.heider@hensoldt.net>
Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
---
hw/timer/imx_epit.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/timer/imx_epit.c b/hw/timer/imx_epit.c
index 2bf8c754b2..0b13c1eab0 100644
--- a/hw/timer/imx_epit.c
+++ b/hw/timer/imx_epit.c
@@ -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 */
--
2.34.4