summaryrefslogtreecommitdiff
path: root/drivers/watchdog/ziirave_wdt.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-08-12 23:08:47 +0300
committerWim Van Sebroeck <wim@linux-watchdog.org>2019-09-17 09:59:03 +0300
commitb774fcef7dde27da8e8ed21571a254b1a78d200f (patch)
treee497ae9cfaadc34106b1ebb4502cb45ab368ae3c /drivers/watchdog/ziirave_wdt.c
parent4a9600c7e735c343cf723bf4a97bfb0435748e20 (diff)
downloadlinux-b774fcef7dde27da8e8ed21571a254b1a78d200f.tar.xz
watchdog: ziirave_wdt: Be more verbose during firmware update
Add more error logging to ziirave_firm_upload() for diagnostics. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Chris Healy <cphealy@gmail.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Rick Ramstetter <rick@anteaterllc.com> Cc: linux-watchdog@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20190812200906.31344-4-andrew.smirnov@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog/ziirave_wdt.c')
-rw-r--r--drivers/watchdog/ziirave_wdt.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/watchdog/ziirave_wdt.c b/drivers/watchdog/ziirave_wdt.c
index 8c71341a9c1c..b3e255b40209 100644
--- a/drivers/watchdog/ziirave_wdt.c
+++ b/drivers/watchdog/ziirave_wdt.c
@@ -335,14 +335,18 @@ static int ziirave_firm_upload(struct watchdog_device *wdd,
ret = ziirave_firm_write_byte(wdd, ZIIRAVE_CMD_JUMP_TO_BOOTLOADER, 1,
false);
- if (ret)
+ if (ret) {
+ dev_err(&client->dev, "Failed to jump to bootloader\n");
return ret;
+ }
msleep(500);
ret = ziirave_firm_write_byte(wdd, ZIIRAVE_CMD_DOWNLOAD_START, 1, true);
- if (ret)
+ if (ret) {
+ dev_err(&client->dev, "Failed to start download\n");
return ret;
+ }
msleep(500);
@@ -438,14 +442,20 @@ static int ziirave_firm_upload(struct watchdog_device *wdd,
/* End download operation */
ret = ziirave_firm_write_byte(wdd, ZIIRAVE_CMD_DOWNLOAD_END, 1, false);
- if (ret)
+ if (ret) {
+ dev_err(&client->dev,
+ "Failed to end firmware download: %d\n", ret);
return ret;
+ }
/* Reset the processor */
ret = ziirave_firm_write_byte(wdd, ZIIRAVE_CMD_RESET_PROCESSOR, 1,
false);
- if (ret)
+ if (ret) {
+ dev_err(&client->dev,
+ "Failed to reset the watchdog: %d\n", ret);
return ret;
+ }
msleep(500);