From 9a462204d13bd8acd735f8111dc7f9412e812b33 Mon Sep 17 00:00:00 2001 From: hauke Date: Sat, 24 Nov 2012 20:07:25 +0000 Subject: brcm47xx: update watchdog driver This watchdog driver should work with SoC having a PMU. This fixes #11720. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34323 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...extif-add-check-for-max-value-in-watchdog.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 target/linux/brcm47xx/patches-3.6/552-ssb-extif-add-check-for-max-value-in-watchdog.patch (limited to 'target/linux/brcm47xx/patches-3.6/552-ssb-extif-add-check-for-max-value-in-watchdog.patch') diff --git a/target/linux/brcm47xx/patches-3.6/552-ssb-extif-add-check-for-max-value-in-watchdog.patch b/target/linux/brcm47xx/patches-3.6/552-ssb-extif-add-check-for-max-value-in-watchdog.patch new file mode 100644 index 000000000..c6756dd11 --- /dev/null +++ b/target/linux/brcm47xx/patches-3.6/552-ssb-extif-add-check-for-max-value-in-watchdog.patch @@ -0,0 +1,25 @@ +--- a/drivers/ssb/driver_extif.c ++++ b/drivers/ssb/driver_extif.c +@@ -112,9 +112,10 @@ void ssb_extif_get_clockcontrol(struct s + *m = extif_read32(extif, SSB_EXTIF_CLOCK_SB); + } + +-void ssb_extif_watchdog_timer_set(struct ssb_extif *extif, +- u32 ticks) ++void ssb_extif_watchdog_timer_set(struct ssb_extif *extif, u32 ticks) + { ++ if (ticks > SSB_EXTIF_WATCHDOG_MAX_TIMER) ++ ticks = SSB_EXTIF_WATCHDOG_MAX_TIMER; + extif_write32(extif, SSB_EXTIF_WATCHDOG, ticks); + } + +--- a/include/linux/ssb/ssb_driver_extif.h ++++ b/include/linux/ssb/ssb_driver_extif.h +@@ -152,6 +152,7 @@ + /* watchdog */ + #define SSB_EXTIF_WATCHDOG_CLK 48000000 /* Hz */ + ++#define SSB_EXTIF_WATCHDOG_MAX_TIMER ((1 << 28) - 1) + + + #ifdef CONFIG_SSB_DRIVER_EXTIF -- cgit v1.2.3