summaryrefslogtreecommitdiffstats
path: root/hw/watchdog/wdt_aspeed.c
diff options
context:
space:
mode:
authorCédric Le Goater2017-10-12 14:20:06 +0200
committerPeter Maydell2017-10-12 14:20:06 +0200
commitf958537a0d2037134b998dff597f8ae3cc6611fd (patch)
treecd038f22b8ec1bd24785cb8b47a5543f35ea76b4 /hw/watchdog/wdt_aspeed.c
parentMerge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request'... (diff)
downloadqemu-f958537a0d2037134b998dff597f8ae3cc6611fd.tar.gz
qemu-f958537a0d2037134b998dff597f8ae3cc6611fd.tar.xz
qemu-f958537a0d2037134b998dff597f8ae3cc6611fd.zip
watchdog/aspeed: fix variable type to store reload value
Initially from Anton D. Kachalov" <mouse@yandex-team.ru> but the SoB was missing. Signed-off-by: Cédric Le Goater <clg@kaod.org> Acked-by: Andrew Jeffery <andrew@aj.id.au> Message-id: 20170920064915.30027-1-clg@kaod.org [clg: change commit log and subject replace UL suffix by ULL ] Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/watchdog/wdt_aspeed.c')
-rw-r--r--hw/watchdog/wdt_aspeed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c
index 22bce364d7..95f6ad186d 100644
--- a/hw/watchdog/wdt_aspeed.c
+++ b/hw/watchdog/wdt_aspeed.c
@@ -100,13 +100,13 @@ static uint64_t aspeed_wdt_read(void *opaque, hwaddr offset, unsigned size)
static void aspeed_wdt_reload(AspeedWDTState *s, bool pclk)
{
- uint32_t reload;
+ uint64_t reload;
if (pclk) {
reload = muldiv64(s->regs[WDT_RELOAD_VALUE], NANOSECONDS_PER_SECOND,
s->pclk_freq);
} else {
- reload = s->regs[WDT_RELOAD_VALUE] * 1000;
+ reload = s->regs[WDT_RELOAD_VALUE] * 1000ULL;
}
if (aspeed_wdt_is_enabled(s)) {