[PATCH] ssb: Watchdog support

From: Michael Buesch
Date: Mon Jul 30 2007 - 16:17:21 EST


From: Aurelien Jarno <aurelien@xxxxxxxxxxx>

The patch below against 2.6.23-rc1-mm1 adds a new function to control
the watchdog. It originally comes from the OpenWrt patches.

Cc: Felix Fietkau <nbd@xxxxxxxxxxx>
Signed-off-by: Aurelien Jarno <aurelien@xxxxxxxxxxx>
Signed-off-by: Michael Buesch <mb@xxxxxxxxx>

--- a/drivers/ssb/driver_chipcommon.c 2007-07-30 19:59:02.000000000 +0200
+++ b/drivers/ssb/driver_chipcommon.c 2007-07-30 20:55:54.000000000 +0200
@@ -344,6 +344,13 @@
}
}

+/* Set chip watchdog reset timer to fire in 'ticks' backplane cycles */
+void
+ssb_chipco_watchdog_timer_set(struct ssb_chipcommon *cc, u32 ticks)
+{
+ /* instant NMI */
+ chipco_write32(cc, SSB_CHIPCO_WATCHDOG, ticks);
+}

#ifdef CONFIG_SSB_SERIAL
int ssb_chipco_serial_init(struct ssb_chipcommon *cc,
--- a/include/linux/ssb/ssb_driver_chipcommon.h 2007-07-30 19:59:02.000000000 +0200
+++ b/include/linux/ssb/ssb_driver_chipcommon.h 2007-07-30 20:55:54.000000000 +0200
@@ -380,6 +380,9 @@
extern void ssb_chipco_set_clockmode(struct ssb_chipcommon *cc,
enum ssb_clkmode mode);

+extern void ssb_chipco_watchdog_timer_set(struct ssb_chipcommon *cc,
+ u32 ticks);
+
#ifdef CONFIG_SSB_SERIAL
extern int ssb_chipco_serial_init(struct ssb_chipcommon *cc,
struct ssb_serial_port *ports);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/