diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-02-10 14:09:50 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-02-19 09:18:05 +0100 |
commit | 63345435ac53949dc07b4ee7f31be4137b4132d1 (patch) | |
tree | 98827e68fe53a881e0882e9327a1221ec0d26d9a | |
parent | c6250f94edb7765d0cff198cb0ac87f75e556276 (diff) | |
download | barebox-63345435ac53949dc07b4ee7f31be4137b4132d1.tar.gz barebox-63345435ac53949dc07b4ee7f31be4137b4132d1.tar.xz |
watchdog: f71808e: only print reset reason if one's indicated
On most resets, a "reset reason: unknown" would clutter the console,
because the watchdog doesn't support differentiating between POR and
RST. Reduce the clutter by only printing the message when we have
something interesting to say (i.e. watchdog reset).
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/watchdog/f71808e_wdt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c index 5307ab0b3e..6f2d30ec77 100644 --- a/drivers/watchdog/f71808e_wdt.c +++ b/drivers/watchdog/f71808e_wdt.c @@ -256,11 +256,11 @@ static int f71808e_wdt_init(struct f71808e_wdt *wd, struct device_d *dev) wdd->set_timeout = &f71808e_wdt_set_timeout; wdd->timeout_max = WATCHDOG_MAX_TIMEOUT; - if (wdt_conf & BIT(F71808FG_FLAG_WDTMOUT_STS)) - reset_source_set_priority(RESET_WDG, - RESET_SOURCE_DEFAULT_PRIORITY); + if (wdt_conf & BIT(F71808FG_FLAG_WDTMOUT_STS)) { + reset_source_set_priority(RESET_WDG, RESET_SOURCE_DEFAULT_PRIORITY); + dev_info(dev, "reset reason: WDT\n"); + } - dev_info(dev, "reset reason: %s\n", reset_source_name()); if (test_bit(F71808FG_FLAG_WD_EN, &wdt_conf)) wdd->running = WDOG_HW_RUNNING; |