[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/48] Move npcm7xx_timer_reached_zero call out of npcm7xx_timer_p
From: |
Peter Maydell |
Subject: |
[PULL 15/48] Move npcm7xx_timer_reached_zero call out of npcm7xx_timer_pause |
Date: |
Tue, 27 Oct 2020 11:44:05 +0000 |
From: Havard Skinnemoen <hskinnemoen@google.com>
This allows us to reuse npcm7xx_timer_pause for the watchdog timer.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Havard Skinnemoen <hskinnemoen@google.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/timer/npcm7xx_timer.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/timer/npcm7xx_timer.c b/hw/timer/npcm7xx_timer.c
index 5703e43d404..2df9e3e4969 100644
--- a/hw/timer/npcm7xx_timer.c
+++ b/hw/timer/npcm7xx_timer.c
@@ -157,9 +157,6 @@ static void npcm7xx_timer_pause(NPCM7xxTimer *t)
timer_del(&t->qtimer);
now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
t->remaining_ns = t->expires_ns - now;
- if (t->remaining_ns <= 0) {
- npcm7xx_timer_reached_zero(t);
- }
}
/*
@@ -239,6 +236,9 @@ static void npcm7xx_timer_write_tcsr(NPCM7xxTimer *t,
uint32_t new_tcsr)
} else {
t->tcsr &= ~NPCM7XX_TCSR_CACT;
npcm7xx_timer_pause(t);
+ if (t->remaining_ns <= 0) {
+ npcm7xx_timer_reached_zero(t);
+ }
}
}
}
--
2.20.1
- [PULL 10/48] linux-user/elfload: Parse NT_GNU_PROPERTY_TYPE_0 notes, (continued)
- [PULL 10/48] linux-user/elfload: Parse NT_GNU_PROPERTY_TYPE_0 notes, Peter Maydell, 2020/10/27
- [PULL 08/48] linux-user/elfload: Use Error for load_elf_image, Peter Maydell, 2020/10/27
- [PULL 04/48] linux-user/elfload: Avoid leaking interp_name using GLib memory API, Peter Maydell, 2020/10/27
- [PULL 02/48] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI, Peter Maydell, 2020/10/27
- [PULL 09/48] linux-user/elfload: Use Error for load_elf_interp, Peter Maydell, 2020/10/27
- [PULL 03/48] include/elf: Add defines related to GNU property notes for AArch64, Peter Maydell, 2020/10/27
- [PULL 06/48] linux-user/elfload: Adjust iteration over phdr, Peter Maydell, 2020/10/27
- [PULL 07/48] linux-user/elfload: Move PT_INTERP detection to first loop, Peter Maydell, 2020/10/27
- [PULL 13/48] hw/arm/highbank: Silence warnings about missing fallthrough statements, Peter Maydell, 2020/10/27
- [PULL 14/48] hw/arm: fix min_cpus for xlnx-versal-virt platform, Peter Maydell, 2020/10/27
- [PULL 15/48] Move npcm7xx_timer_reached_zero call out of npcm7xx_timer_pause,
Peter Maydell <=
- [PULL 17/48] hw/misc: Add npcm7xx random number generator, Peter Maydell, 2020/10/27
- [PULL 16/48] hw/timer: Adding watchdog for NPCM7XX Timer., Peter Maydell, 2020/10/27
- [PULL 11/48] linux-user/elfload: Parse GNU_PROPERTY_AARCH64_FEATURE_1_AND, Peter Maydell, 2020/10/27
- [PULL 12/48] tests/tcg/aarch64: Add bti smoke tests, Peter Maydell, 2020/10/27
- [PULL 18/48] hw/arm/npcm7xx: Add EHCI and OHCI controllers, Peter Maydell, 2020/10/27
- [PULL 20/48] hw/arm/smmuv3: Set the restoration priority of the vSMMUv3 explicitly, Peter Maydell, 2020/10/27
- [PULL 21/48] hw/arm/bcm2836: Restrict BCM283XInfo declaration to C source, Peter Maydell, 2020/10/27
- [PULL 19/48] hw/gpio: Add GPIO model for Nuvoton NPCM7xx, Peter Maydell, 2020/10/27
- [PULL 22/48] hw/arm/bcm2836: QOM'ify more by adding class_init() to each SoC type, Peter Maydell, 2020/10/27
- [PULL 24/48] hw/arm/bcm2836: Only provide "enabled-cpus" property to multicore SoCs, Peter Maydell, 2020/10/27