aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorAndy Boyett <agb@openwrt.org>2008-02-19 00:26:12 +0000
committerAndy Boyett <agb@openwrt.org>2008-02-19 00:26:12 +0000
commit7b2430f27161a870f57871eb2a480da97b065ba9 (patch)
tree80c0ed03f7d5114f3e3e4aa3086b40ebd667fdcb /target/linux
parentfe7e52b4fa4c5f5850213d620e2f59d83a0767c3 (diff)
downloadupstream-7b2430f27161a870f57871eb2a480da97b065ba9.tar.gz
upstream-7b2430f27161a870f57871eb2a480da97b065ba9.tar.bz2
upstream-7b2430f27161a870f57871eb2a480da97b065ba9.zip
Patch for extif watchdog support. Thanks b.sander. Closes #2363 #2814 and #3141
SVN-Revision: 10489
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/brcm47xx/patches-2.6.23/610-ssb-watchdog-fix.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-2.6.23/610-ssb-watchdog-fix.patch b/target/linux/brcm47xx/patches-2.6.23/610-ssb-watchdog-fix.patch
new file mode 100644
index 0000000000..55ba9a02f4
--- /dev/null
+++ b/target/linux/brcm47xx/patches-2.6.23/610-ssb-watchdog-fix.patch
@@ -0,0 +1,53 @@
+--- a/drivers/ssb/driver_mipscore.c 2007-12-06 08:07:00.000000000 +0100
++++ b/drivers/ssb/driver_mipscore.c 2007-12-06 10:27:43.000000000 +0100
+@@ -31,6 +31,19 @@
+ ssb_write32(extif->dev, offset, value);
+ }
+
++/* Set chip watchdog reset timer to fire in 'ticks' backplane cycles */
++int
++ssb_watchdog(struct ssb_bus *bus, uint ticks)
++{
++ /* instant NMI */
++ if (bus->chipco.dev)
++ ssb_write32(bus->chipco.dev, SSB_CHIPCO_WATCHDOG, ticks);
++ else if (bus->extif.dev)
++ ssb_write32(bus->extif.dev, SSB_EXTIF_WATCHDOG, ticks);
++ return 0;
++}
++EXPORT_SYMBOL(ssb_watchdog);
++
+ static const u32 ipsflag_irq_mask[] = {
+ 0,
+ SSB_IPSFLAG_IRQ1,
+--- a/include/linux/ssb/ssb_driver_mips.h 2007-12-06 08:07:00.000000000 +0100
++++ b/include/linux/ssb/ssb_driver_mips.h 2007-12-06 10:32:36.000000000 +0100
+@@ -30,6 +30,8 @@
+
+ extern unsigned int ssb_mips_irq(struct ssb_device *dev);
+
++/* Set watchdog reset timer to fire in 'ticks' backplane cycles */
++extern int ssb_watchdog(struct ssb_bus *bus, uint ticks);
+
+ #else /* CONFIG_SSB_DRIVER_MIPS */
+
+--- a/arch/mips/bcm947xx/setup.c 2007-12-06 08:07:00.000000000 +0100
++++ b/arch/mips/bcm947xx/setup.c 2007-12-06 10:33:39.000000000 +0100
+@@ -55,7 +55,7 @@
+ */
+
+ /* Set the watchdog timer to reset immediately */
+- ssb_chipco_watchdog_timer_set(&ssb.chipco, 1);
++ ssb_watchdog(&ssb, 1);
+ while (1)
+ cpu_relax();
+ }
+@@ -64,7 +64,7 @@
+ {
+ /* Disable interrupts and watchdog and spin forever */
+ local_irq_disable();
+- ssb_chipco_watchdog_timer_set(&ssb.chipco, 0);
++ ssb_watchdog(&ssb, 0);
+ while (1)
+ cpu_relax();
+ }