From: Zhao Qiang Date: Wed, 25 Nov 2020 04:55:47 +0000 (+0800) Subject: watchdog: sbsa: timeout should be in "millisecond" X-Git-Tag: v2025.01-rc5-pxa1908~2108^2~9 X-Git-Url: http://git.dujemihanovic.xyz/img/static/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/index.xml?a=commitdiff_plain;h=c2ba01c082b4ab21e43bb15e1c3a7e19573d1133;p=u-boot.git watchdog: sbsa: timeout should be in "millisecond" timeout should be in "millisecond" instead of second, so divided it by 1000 when calculate the load value. Signed-off-by: Zhao Qiang --- diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c index 2eae431ba6..96285c1a9b 100644 --- a/drivers/watchdog/sbsa_gwdt.c +++ b/drivers/watchdog/sbsa_gwdt.c @@ -61,7 +61,7 @@ static int sbsa_gwdt_start(struct udevice *dev, u64 timeout, ulong flags) * to half value of timeout. */ clk = get_tbclk(); - writel(clk / 2 * timeout, + writel(clk / (2 * 1000) * timeout, priv->reg_control + SBSA_GWDT_WOR); /* writing WCS will cause an explicit watchdog refresh */