diff mbox series

[02/11] hw/rtc/ls7a_rtc: Fix timer call back function

Message ID 20220701093407.2150607-3-yangxiaojuan@loongson.cn
State New
Headers show
Series Fix bugs for LoongArch virt machine | expand

Commit Message

Xiaojuan Yang July 1, 2022, 9:33 a.m. UTC
Replace qemu_irq_pulse with qemu_irq_raise in ls7a_timer_cb function
to keep consistent with hardware behavior when raise irq.

Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
---
 hw/rtc/ls7a_rtc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Richard Henderson July 4, 2022, 5:13 a.m. UTC | #1
On 7/1/22 15:03, Xiaojuan Yang wrote:
> Replace qemu_irq_pulse with qemu_irq_raise in ls7a_timer_cb function
> to keep consistent with hardware behavior when raise irq.
> 
> Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

diff --git a/hw/rtc/ls7a_rtc.c b/hw/rtc/ls7a_rtc.c
index b88a90de8b..780144b9da 100644
--- a/hw/rtc/ls7a_rtc.c
+++ b/hw/rtc/ls7a_rtc.c
@@ -425,7 +425,7 @@  static void toy_timer_cb(void *opaque)
     LS7ARtcState *s = opaque;
 
     if (toy_enabled(s)) {
-        qemu_irq_pulse(s->irq);
+        qemu_irq_raise(s->irq);
     }
 }
 
@@ -434,7 +434,7 @@  static void rtc_timer_cb(void *opaque)
     LS7ARtcState *s = opaque;
 
     if (rtc_enabled(s)) {
-        qemu_irq_pulse(s->irq);
+        qemu_irq_raise(s->irq);
     }
 }