diff options
author | Timur Tabi <timur@freescale.com> | 2011-02-08 18:39:46 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2011-03-15 12:02:39 -0400 |
commit | 112e75466f63997d0f4c3c13ecf999e36aea692f (patch) | |
tree | e95a19c9140f2c167602183d313ae6c53fa7569e /drivers/watchdog | |
parent | 5f3b27569fc0286a51f8d0655c7fb4f5b36aea65 (diff) |
watchdog: booke_wdt: clean up status messages
Improve the status messages that are displayed during some operations of the
PowerPC watchdog timer driver. When the watchdog is enabled, the timeout is
displayed as a number of seconds, instead of an obscure "period". The "period"
is the position of a bit in a 64-bit timer register. The higher the value,
the quicker the watchdog timeout occurs. Some people chose a high "period"
value for the timer and get confused as to why the board resets within a
few seconds.
Messages displayed during open and close are now debug messages, so that they
don't clutter the console by default. Finally, printk() is replaced with the
pr_xxx() equivalent.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/booke_wdt.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 7e7ec9c35b6..337265b4730 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Author: Matthew McClintock | 4 | * Author: Matthew McClintock |
5 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 5 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
6 | * | 6 | * |
7 | * Copyright 2005, 2008, 2010 Freescale Semiconductor Inc. | 7 | * Copyright 2005, 2008, 2010-2011 Freescale Semiconductor Inc. |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify it | 9 | * This program is free software; you can redistribute it and/or modify it |
10 | * under the terms of the GNU General Public License as published by the | 10 | * under the terms of the GNU General Public License as published by the |
@@ -221,9 +221,8 @@ static int booke_wdt_open(struct inode *inode, struct file *file) | |||
221 | if (booke_wdt_enabled == 0) { | 221 | if (booke_wdt_enabled == 0) { |
222 | booke_wdt_enabled = 1; | 222 | booke_wdt_enabled = 1; |
223 | on_each_cpu(__booke_wdt_enable, NULL, 0); | 223 | on_each_cpu(__booke_wdt_enable, NULL, 0); |
224 | printk(KERN_INFO | 224 | pr_debug("booke_wdt: watchdog enabled (timeout = %llu sec)\n", |
225 | "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n", | 225 | period_to_sec(booke_wdt_period)); |
226 | booke_wdt_period); | ||
227 | } | 226 | } |
228 | spin_unlock(&booke_wdt_lock); | 227 | spin_unlock(&booke_wdt_lock); |
229 | 228 | ||
@@ -240,6 +239,7 @@ static int booke_wdt_release(struct inode *inode, struct file *file) | |||
240 | */ | 239 | */ |
241 | on_each_cpu(__booke_wdt_disable, NULL, 0); | 240 | on_each_cpu(__booke_wdt_disable, NULL, 0); |
242 | booke_wdt_enabled = 0; | 241 | booke_wdt_enabled = 0; |
242 | pr_debug("booke_wdt: watchdog disabled\n"); | ||
243 | #endif | 243 | #endif |
244 | 244 | ||
245 | clear_bit(0, &wdt_is_active); | 245 | clear_bit(0, &wdt_is_active); |
@@ -271,21 +271,20 @@ static int __init booke_wdt_init(void) | |||
271 | { | 271 | { |
272 | int ret = 0; | 272 | int ret = 0; |
273 | 273 | ||
274 | printk(KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n"); | 274 | pr_info("booke_wdt: powerpc book-e watchdog driver loaded\n"); |
275 | ident.firmware_version = cur_cpu_spec->pvr_value; | 275 | ident.firmware_version = cur_cpu_spec->pvr_value; |
276 | 276 | ||
277 | ret = misc_register(&booke_wdt_miscdev); | 277 | ret = misc_register(&booke_wdt_miscdev); |
278 | if (ret) { | 278 | if (ret) { |
279 | printk(KERN_CRIT "Cannot register miscdev on minor=%d: %d\n", | 279 | pr_err("booke_wdt: cannot register device (minor=%u, ret=%i)\n", |
280 | WATCHDOG_MINOR, ret); | 280 | WATCHDOG_MINOR, ret); |
281 | return ret; | 281 | return ret; |
282 | } | 282 | } |
283 | 283 | ||
284 | spin_lock(&booke_wdt_lock); | 284 | spin_lock(&booke_wdt_lock); |
285 | if (booke_wdt_enabled == 1) { | 285 | if (booke_wdt_enabled == 1) { |
286 | printk(KERN_INFO | 286 | pr_info("booke_wdt: watchdog enabled (timeout = %llu sec)\n", |
287 | "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n", | 287 | period_to_sec(booke_wdt_period)); |
288 | booke_wdt_period); | ||
289 | on_each_cpu(__booke_wdt_enable, NULL, 0); | 288 | on_each_cpu(__booke_wdt_enable, NULL, 0); |
290 | } | 289 | } |
291 | spin_unlock(&booke_wdt_lock); | 290 | spin_unlock(&booke_wdt_lock); |