Skip to contentSkip to conversation

v2.6.29-rc watchdog fixes

GIT-PULL Wim Van Sebroeck 1 participant 1 message Mar 5, 2009 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

Hi Linus,

Please pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git

This will update the following files:

 drivers/watchdog/gef_wdt.c     |    2 
 drivers/watchdog/ks8695_wdt.c  |    1 
 drivers/watchdog/orion5x_wdt.c |    1 
 drivers/watchdog/rc32434_wdt.c |  168 ++++++++++++++++-------------------------
 4 files changed, 72 insertions(+), 100 deletions(-)

with these Changes:

Author: Wim Van Sebroeck <[email protected]>
Date:   Wed Feb 25 13:33:01 2009 +0100

[WATCHDOG] orion5x_wdt.c: 'ORION5X_TCLK' undeclared

orion5x_wdt no longer compiled after the changes in commit ebe35aff883496c07248df82c8576c3b6e84bbbe ("Orion: prepare for runtime-determined timer tick rate").

The tick rate define (ORION5X_TCLK) was removed in favor of a runtime detection. The quick fix is to add the define in the watchdog driver. The fix is not correct for all supported orion5x platforms, but since the supported platforms right now are 133 Mhz and 166 Mhz, it won't be _that_ far off. ;-) A fix that uses the runtime-determined timer tick rate will be applied later.

Cc Kristof Provost <[email protected]>
Cc Nicolas Pitre <[email protected]>
Cc Russell King <[email protected]>
Cc Andrew Morton <[email protected]>
Author: Roel Kluin <[email protected]>
Date:   Tue Mar 3 15:10:05 2009 +0100

[WATCHDOG] gef_wdt.c: fsl_get_sys_freq() failure not noticed

fsl_get_sys_freq() may return -1 when 'soc' isn't found, but in gef_wdt_probe() 'freq' is unsigned, so the test doesn't catch that.

Author: Alexey Dobriyan <[email protected]>
Date:   Thu Feb 12 13:42:41 2009 +0300

[WATCHDOG] ks8695_wdt.c: 'CLOCK_TICK_RATE' undeclared

On arm-acs5k_tiny:

drivers/watchdog/ks8695_wdt.c:68: error: 'CLOCK_TICK_RATE' undeclared
(first use in this function)

Author: Phil Sutter <[email protected]>
Date:   Sun Feb 8 16:44:42 2009 +0100

[WATCHDOG] rc32434_wdt: fix sections

Fix init and exit sections.

Author: Phil Sutter <[email protected]>
Date:   Sun Feb 8 16:44:42 2009 +0100

[WATCHDOG] rc32434_wdt: fix watchdog driver

The existing driver code wasn't working. Neither the timeout was set correctly, nor system reset was being triggered, as the driver seemed to keep the WDT alive himself. There was also some unnecessary code.

The Changes can also be looked at on:

	http://www.kernel.org/git/?p=linux/kernel/git/wim/linux-2.6-watchdog.git;a=summary

For completeness, I added the overal diff below.

Greetings,
Wim.

================================================================================

drivers/watchdog/gef_wdt.c +1 -1
index f0c2b7a..734d980 100644
@@ -269,7 +269,7 @@ static int __devinit gef_wdt_probe(struct of_device *dev,
 	bus_clk = 133; /* in MHz */
 
 	freq = fsl_get_sys_freq();
-	if (freq > 0)
+	if (freq != -1)
 		bus_clk = freq;
 
 	/* Map devices registers into memory */
drivers/watchdog/ks8695_wdt.c +1 -0
index 0b798fd..74c92d3 100644
@@ -21,6 +21,7 @@
 #include <linux/watchdog.h>
 #include <linux/io.h>
 #include <linux/uaccess.h>
+#include <mach/timex.h>
 #include <mach/regs-timer.h>
 
 #define WDT_DEFAULT_TIME	5	/* seconds */
drivers/watchdog/orion5x_wdt.c +1 -0
index 14a339f..b64ae1a 100644
@@ -29,6 +29,7 @@
 #define  WDT_EN			0x0010
 #define WDT_VAL			(TIMER_VIRT_BASE + 0x0024)
 
+#define ORION5X_TCLK		166666667
 #define WDT_MAX_DURATION	(0xffffffff / ORION5X_TCLK)
 #define WDT_IN_USE		0
 #define WDT_OK_TO_CLOSE		1
drivers/watchdog/rc32434_wdt.c +69 -99

292 lines not on this page · raw message