diff options
author | Chanho Park <chanho61.park@samsung.com> | 2023-12-03 17:30:40 +0900 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2023-12-04 08:09:09 +0100 |
commit | a341a0e01f8087904eccbf3fe7baba63a62f9674 (patch) | |
tree | debd72e3d70b141d40a15130a3404ead2dca5f50 /drivers/watchdog | |
parent | 5c4e9d0c74a8c2f8d0f4e0ab9cf44959298c2bad (diff) | |
download | u-boot-a341a0e01f8087904eccbf3fe7baba63a62f9674.tar.gz u-boot-a341a0e01f8087904eccbf3fe7baba63a62f9674.tar.bz2 u-boot-a341a0e01f8087904eccbf3fe7baba63a62f9674.zip |
watchdog: Correct watchdog timeout print message
The wdt_start function takes timeout_ms as a parameter and starts the
watchdog with this value. However, when you output the message, it shows
the default timeout value for the watchdog device.
So this patch fixes that part to output the correct timeout value.
Before -->
StarFive # wdt start 3000
WDT: Started watchdog@13070000 without servicing (60s timeout)
After -->
StarFive # wdt start 3000
WDT: Started watchdog@13070000 without servicing (3s timeout)
Fixes: c2fd0ca1a822 ("watchdog: Integrate watchdog triggering into the cyclic framework")
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/wdt-uclass.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c index ed329284de..417e8d7eef 100644 --- a/drivers/watchdog/wdt-uclass.c +++ b/drivers/watchdog/wdt-uclass.c @@ -7,6 +7,7 @@ #include <common.h> #include <cyclic.h> +#include <div64.h> #include <dm.h> #include <errno.h> #include <hang.h> @@ -141,7 +142,7 @@ int wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags) printf("WDT: Started %s with%s servicing %s (%ds timeout)\n", dev->name, IS_ENABLED(CONFIG_WATCHDOG) ? "" : "out", - str, priv->timeout); + str, (u32)lldiv(timeout_ms, 1000)); } return ret; |