Skip to content
Snippets Groups Projects
Commit f958537a authored by Cédric Le Goater's avatar Cédric Le Goater Committed by Peter Maydell
Browse files

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: default avatarCédric Le Goater <clg@kaod.org>
Acked-by: default avatarAndrew 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: default avatarCédric Le Goater <clg@kaod.org>
Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parent a0b261db
No related branches found
No related tags found
No related merge requests found
......@@ -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)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment