[PATCH] watchdog: sbsa: timeout should be in "millisecond"
Qiang Zhao
qiang.zhao at nxp.com
Wed Nov 25 05:55:47 CET 2020
From: Zhao Qiang <qiang.zhao at nxp.com>
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 at nxp.com>
---
drivers/watchdog/sbsa_gwdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c
index 2eae431..96285c1 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 */
--
2.7.4
More information about the U-Boot
mailing list