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>
This commit is contained in:
parent
a0b261db8c
commit
f958537a0d
|
@ -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)
|
static void aspeed_wdt_reload(AspeedWDTState *s, bool pclk)
|
||||||
{
|
{
|
||||||
uint32_t reload;
|
uint64_t reload;
|
||||||
|
|
||||||
if (pclk) {
|
if (pclk) {
|
||||||
reload = muldiv64(s->regs[WDT_RELOAD_VALUE], NANOSECONDS_PER_SECOND,
|
reload = muldiv64(s->regs[WDT_RELOAD_VALUE], NANOSECONDS_PER_SECOND,
|
||||||
s->pclk_freq);
|
s->pclk_freq);
|
||||||
} else {
|
} else {
|
||||||
reload = s->regs[WDT_RELOAD_VALUE] * 1000;
|
reload = s->regs[WDT_RELOAD_VALUE] * 1000ULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aspeed_wdt_is_enabled(s)) {
|
if (aspeed_wdt_is_enabled(s)) {
|
||||||
|
|
Loading…
Reference in New Issue