]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
watchdog: sbsa: timeout should be in "millisecond"
authorZhao Qiang <qiang.zhao@nxp.com>
Wed, 25 Nov 2020 04:55:47 +0000 (12:55 +0800)
committerTom Rini <trini@konsulko.com>
Wed, 2 Dec 2020 21:21:58 +0000 (16:21 -0500)
timeout should be in "millisecond" instead of second,
so divided it by 1000 when calculate the load value.

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
drivers/watchdog/sbsa_gwdt.c

index 2eae431ba6c13c872e9c7744cfe7203dfd47309a..96285c1a9b4862a3d3fa432a82e650815c458a84 100644 (file)
@@ -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 */