From 8ad4f7756bebcbb20556f08fd1131864de12ddf3 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Wed, 6 Dec 2017 15:17:25 +0800 Subject: [PATCH] watchdog: meson: add debug info PD#154260: watchdog: meson: add debug info Change-Id: I98cb723099bc05f721ba8d52002cb724d9c5a978 Signed-off-by: Bo Yang --- drivers/amlogic/watchdog/meson_wdt.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/amlogic/watchdog/meson_wdt.c b/drivers/amlogic/watchdog/meson_wdt.c index 121305d734e2..c119e6684c58 100644 --- a/drivers/amlogic/watchdog/meson_wdt.c +++ b/drivers/amlogic/watchdog/meson_wdt.c @@ -35,7 +35,7 @@ #include #undef pr_fmt -#define pr_fmt(fmt) "aml-wdt: %s: " fmt, __func__ +#define pr_fmt(fmt) "meson-watchdog: %s: " fmt, __func__ #define CTRL 0x0 #define CTRL1 0x4 @@ -109,6 +109,7 @@ static int aml_wdt_start(struct watchdog_device *wdog) if (wdev->boot_queue) cancel_delayed_work(&wdev->boot_queue); #endif + dev_info(wdev->dev, "start watchdog\n"); return 0; } @@ -119,6 +120,8 @@ static int aml_wdt_stop(struct watchdog_device *wdog) mutex_lock(&wdev->lock); disable_watchdog(wdev); mutex_unlock(&wdev->lock); + dev_info(wdev->dev, "stop watchdog\n"); + return 0; } @@ -144,6 +147,7 @@ static int aml_wdt_set_timeout(struct watchdog_device *wdog, wdev->timeout = timeout; mutex_unlock(&wdev->lock); + dev_info(wdev->dev, "set timeout\n"); return 0; } @@ -253,11 +257,13 @@ static int aml_wtd_pm_notify(struct notifier_block *nb, unsigned long event, if (event == PM_SUSPEND_PREPARE) { disable_watchdog(wdev); - pr_info("disable watchdog\n"); + dev_info(wdev->dev, + "pm_notify: disable watchdog, event = %lu\n", event); } if (event == PM_POST_SUSPEND) { enable_watchdog(wdev); - pr_info("enable watchdog\n"); + dev_info(wdev->dev, + "pm_notify: enable watchdog, event = %lu\n", event); } return NOTIFY_OK; } @@ -271,7 +277,9 @@ static int aml_wtd_reboot_notify(struct notifier_block *nb, wdev = container_of(nb, struct aml_wdt_dev, reboot_notifier); if (event == SYS_DOWN || event == SYS_HALT) { disable_watchdog(wdev); - pr_info("disable watchdog\n"); + dev_info(wdev->dev, + "reboot_notify: disable watchdog (event = %lu)\n", + event); } if (wdev->reset_watchdog_method == 1) cancel_delayed_work(&wdev->boot_queue); @@ -384,7 +392,7 @@ static struct platform_driver aml_wdt_driver = { .resume = aml_wdt_resume, .driver = { .owner = THIS_MODULE, - .name = "aml_wdt", + .name = "meson_wdt", .of_match_table = aml_wdt_of_match, }, };