summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorZhao Qiang <qiang.zhao@nxp.com>2020-11-25 07:55:47 +0300
committerTom Rini <trini@konsulko.com>2020-12-03 00:21:58 +0300
commitc2ba01c082b4ab21e43bb15e1c3a7e19573d1133 (patch)
tree6314e26ed98537c5bbe960824a0f2675161f6930 /drivers/watchdog
parent7e932ac790b3615a67a3c24041c194aa748c0d98 (diff)
downloadu-boot-c2ba01c082b4ab21e43bb15e1c3a7e19573d1133.tar.xz
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 <qiang.zhao@nxp.com>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/sbsa_gwdt.c2
1 files changed, 1 insertions, 1 deletions
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 */