Skip to contentSkip to conversation

watchdog: sbsa: timeout should be in "millisecond"

PATCH New Qiang Zhao 2 participants 2 messages Nov 25, 2020 – Dec 3, 2020 Watchdog device drivers

lore
Share & tools
lore

Qiang Zhao

author
#0 lore raw

PATCH 1/1 watchdog: sbsa: timeout should be in "millisecond"

From: Zhao Qiang <[email protected]>

timeout should be in "millisecond" instead of second, so divided it by 1000 when calculate the load value.

---
 drivers/watchdog/sbsa_gwdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/sbsa_gwdt.c +1 -1
index 2eae431..96285c1 100644
@@ -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 */
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 watchdog: sbsa: timeout should be in "millisecond"

Quoted 6 lines · Qiang Zhao

From: Zhao Qiang <[email protected]>

timeout should be in "millisecond" instead of second, so divided it by 1000 when calculate the load value.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201203/4747f3a4/attachment.sig>