1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-09-12 11:35:52 +03:00
openwrt-xburst/target/linux/brcm47xx/patches-2.6.23/610-ssb-watchdog-fix.patch
mb e6a5f54f74 ssb: Workaround: Need subsys_initcall to be able to register a PCI bus.
This needs a different fix, but use this workaround for now.



git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10491 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-02-19 01:32:06 +00:00

60 lines
2.1 KiB
Diff

Index: linux-2.6.23.16/drivers/ssb/driver_mipscore.c
===================================================================
--- linux-2.6.23.16.orig/drivers/ssb/driver_mipscore.c 2008-02-19 02:13:15.000000000 +0100
+++ linux-2.6.23.16/drivers/ssb/driver_mipscore.c 2008-02-19 02:13:17.000000000 +0100
@@ -31,6 +31,19 @@ static inline void mips_write32(struct s
ssb_write32(mcore->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,
Index: linux-2.6.23.16/include/linux/ssb/ssb_driver_mips.h
===================================================================
--- linux-2.6.23.16.orig/include/linux/ssb/ssb_driver_mips.h 2008-02-19 02:13:15.000000000 +0100
+++ linux-2.6.23.16/include/linux/ssb/ssb_driver_mips.h 2008-02-19 02:13:17.000000000 +0100
@@ -30,6 +30,8 @@ extern u32 ssb_cpu_clock(struct ssb_mips
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 */
Index: linux-2.6.23.16/arch/mips/bcm947xx/setup.c
===================================================================
--- linux-2.6.23.16.orig/arch/mips/bcm947xx/setup.c 2008-02-19 02:13:15.000000000 +0100
+++ linux-2.6.23.16/arch/mips/bcm947xx/setup.c 2008-02-19 02:13:17.000000000 +0100
@@ -55,7 +55,7 @@ static void bcm47xx_machine_restart(char
*/
/* 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 @@ static void bcm47xx_machine_halt(void)
{
/* 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();
}