All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: sbsa: timeout should be in "millisecond"
@ 2020-11-25  4:55 Qiang Zhao
  2020-12-03 16:59 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Qiang Zhao @ 2020-11-25  4:55 UTC (permalink / raw)
  To: u-boot

From: Zhao Qiang <qiang.zhao@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@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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] watchdog: sbsa: timeout should be in "millisecond"
  2020-11-25  4:55 [PATCH] watchdog: sbsa: timeout should be in "millisecond" Qiang Zhao
@ 2020-12-03 16:59 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2020-12-03 16:59 UTC (permalink / raw)
  To: u-boot

On Wed, Nov 25, 2020 at 12:55:47PM +0800, Qiang Zhao wrote:

> From: Zhao Qiang <qiang.zhao@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@nxp.com>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-03 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25  4:55 [PATCH] watchdog: sbsa: timeout should be in "millisecond" Qiang Zhao
2020-12-03 16:59 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.