brcm47xx: watchdog: deactivate NOWAYOUT.
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 24 Nov 2012 20:24:27 +0000 (20:24 +0000)
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 24 Nov 2012 20:24:27 +0000 (20:24 +0000)
In the old configuration the SoC issued a reboot if the watchdog was
killed also if it was kill with TERM and not KILL.

This will fix #11724.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34324 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/brcm47xx/config-3.6
target/linux/brcm47xx/patches-3.6/540-watchdog-bcm47xx_wdt.c-convert-to-watchdog-core-api.patch
target/linux/brcm47xx/patches-3.6/541-watchdog-bcm47xx_wdt.c-use-platform-device.patch
target/linux/brcm47xx/patches-3.6/542-watchdog-bcm47xx_wdt.c-rename-ops-methods.patch
target/linux/brcm47xx/patches-3.6/543-watchdog-bcm47xx_wdt.c-rename-wdt_timeout-to-timeout.patch
target/linux/brcm47xx/patches-3.6/544-watchdog-bcm47xx_wdt.c-add-hard-timer.patch

index 4859a5b..478ba84 100644 (file)
@@ -145,5 +145,4 @@ CONFIG_USB_ARCH_HAS_XHCI=y
 # CONFIG_USB_HCD_SSB is not set
 CONFIG_USB_SUPPORT=y
 CONFIG_WATCHDOG_CORE=y
-CONFIG_WATCHDOG_NOWAYOUT=y
 CONFIG_ZONE_DMA_FLAG=0
index 7ac5638..21136c0 100644 (file)
  #include <linux/watchdog.h>
  #include <linux/timer.h>
  #include <linux/jiffies.h>
-@@ -48,8 +45,6 @@ MODULE_PARM_DESC(nowayout,
+@@ -41,15 +38,11 @@ module_param(wdt_time, int, 0);
+ MODULE_PARM_DESC(wdt_time, "Watchdog time in seconds. (default="
+                               __MODULE_STRING(WDT_DEFAULT_TIME) ")");
+-#ifdef CONFIG_WATCHDOG_NOWAYOUT
+ module_param(nowayout, bool, 0);
+ MODULE_PARM_DESC(nowayout,
+               "Watchdog cannot be stopped once started (default="
                                __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
- #endif
+-#endif
  
 -static unsigned long bcm47xx_wdt_busy;
 -static char expect_release;
  static struct timer_list wdt_timer;
  static atomic_t ticks;
  
-@@ -97,29 +92,31 @@ static void bcm47xx_timer_tick(unsigned
+@@ -97,29 +90,31 @@ static void bcm47xx_timer_tick(unsigned
        }
  }
  
@@ -75,7 +82,7 @@
  {
        if ((new_time <= 0) || (new_time > WDT_MAX_TIME))
                return -EINVAL;
-@@ -128,51 +125,6 @@ static int bcm47xx_wdt_settimeout(int ne
+@@ -128,51 +123,6 @@ static int bcm47xx_wdt_settimeout(int ne
        return 0;
  }
  
  static const struct watchdog_info bcm47xx_wdt_info = {
        .identity       = DRV_NAME,
        .options        = WDIOF_SETTIMEOUT |
-@@ -180,80 +132,25 @@ static const struct watchdog_info bcm47x
+@@ -180,80 +130,25 @@ static const struct watchdog_info bcm47x
                                WDIOF_MAGICCLOSE,
  };
  
  };
  
  static struct notifier_block bcm47xx_wdt_notifier = {
-@@ -274,12 +171,13 @@ static int __init bcm47xx_wdt_init(void)
+@@ -274,12 +169,13 @@ static int __init bcm47xx_wdt_init(void)
                pr_info("wdt_time value must be 0 < wdt_time < %d, using %d\n",
                        (WDT_MAX_TIME + 1), wdt_time);
        }
        if (ret) {
                unregister_reboot_notifier(&bcm47xx_wdt_notifier);
                return ret;
-@@ -292,10 +190,8 @@ static int __init bcm47xx_wdt_init(void)
+@@ -292,10 +188,8 @@ static int __init bcm47xx_wdt_init(void)
  
  static void __exit bcm47xx_wdt_exit(void)
  {
  
        unregister_reboot_notifier(&bcm47xx_wdt_notifier);
  }
-@@ -306,4 +202,3 @@ module_exit(bcm47xx_wdt_exit);
+@@ -306,4 +200,3 @@ module_exit(bcm47xx_wdt_exit);
  MODULE_AUTHOR("Aleksandar Radovanovic");
  MODULE_DESCRIPTION("Watchdog driver for Broadcom BCM47xx");
  MODULE_LICENSE("GPL");
index 79bb962..593aace 100644 (file)
@@ -30,9 +30,9 @@
  
  #define DRV_NAME              "bcm47xx_wdt"
  
-@@ -45,48 +46,19 @@ MODULE_PARM_DESC(nowayout,
+@@ -43,48 +44,19 @@ MODULE_PARM_DESC(nowayout,
+               "Watchdog cannot be stopped once started (default="
                                __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
- #endif
  
 -static struct timer_list wdt_timer;
 -static atomic_t ticks;
@@ -87,7 +87,7 @@
        } else {
                pr_crit("Watchdog will fire soon!!!\n");
        }
-@@ -94,23 +66,29 @@ static void bcm47xx_timer_tick(unsigned
+@@ -92,23 +64,29 @@ static void bcm47xx_timer_tick(unsigned
  
  static int bcm47xx_wdt_keepalive(struct watchdog_device *wdd)
  {
  
        return 0;
  }
-@@ -118,10 +96,13 @@ static int bcm47xx_wdt_stop(struct watch
+@@ -116,10 +94,13 @@ static int bcm47xx_wdt_stop(struct watch
  static int bcm47xx_wdt_set_timeout(struct watchdog_device *wdd,
                                   unsigned int new_time)
  {
        return 0;
  }
  
-@@ -135,8 +116,11 @@ static const struct watchdog_info bcm47x
+@@ -133,8 +114,11 @@ static const struct watchdog_info bcm47x
  static int bcm47xx_wdt_notify_sys(struct notifier_block *this,
                                  unsigned long code, void *unused)
  {
        return NOTIFY_DONE;
  }
  
-@@ -148,57 +132,72 @@ static struct watchdog_ops bcm47xx_wdt_o
+@@ -146,57 +130,72 @@ static struct watchdog_ops bcm47xx_wdt_o
        .set_timeout    = bcm47xx_wdt_set_timeout,
  };
  
index 54956fd..8d85303 100644 (file)
@@ -1,8 +1,8 @@
 --- a/drivers/watchdog/bcm47xx_wdt.c
 +++ b/drivers/watchdog/bcm47xx_wdt.c
-@@ -46,12 +46,13 @@ MODULE_PARM_DESC(nowayout,
+@@ -44,12 +44,13 @@ MODULE_PARM_DESC(nowayout,
+               "Watchdog cannot be stopped once started (default="
                                __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
- #endif
  
 +
  static inline struct bcm47xx_wdt *bcm47xx_wdt_get(struct watchdog_device *wdd)
@@ -15,7 +15,7 @@
  {
        struct bcm47xx_wdt *wdt = (struct bcm47xx_wdt *)data;
        u32 next_tick = min(wdt->wdd.timeout * 1000, wdt->max_timer_ms);
-@@ -64,7 +65,7 @@ static void bcm47xx_timer_tick(unsigned
+@@ -62,7 +63,7 @@ static void bcm47xx_timer_tick(unsigned
        }
  }
  
@@ -24,7 +24,7 @@
  {
        struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
  
-@@ -73,17 +74,17 @@ static int bcm47xx_wdt_keepalive(struct
+@@ -71,17 +72,17 @@ static int bcm47xx_wdt_keepalive(struct
        return 0;
  }
  
@@ -46,7 +46,7 @@
  {
        struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
  
-@@ -93,8 +94,8 @@ static int bcm47xx_wdt_stop(struct watch
+@@ -91,8 +92,8 @@ static int bcm47xx_wdt_stop(struct watch
        return 0;
  }
  
@@ -57,7 +57,7 @@
  {
        if (new_time < 1 || new_time > WDT_MAX_TIME) {
                pr_warn("timeout value must be 1<=x<=%d, using %d\n",
-@@ -124,12 +125,12 @@ static int bcm47xx_wdt_notify_sys(struct
+@@ -122,12 +123,12 @@ static int bcm47xx_wdt_notify_sys(struct
        return NOTIFY_DONE;
  }
  
@@ -75,7 +75,7 @@
  };
  
  static int __devinit bcm47xx_wdt_probe(struct platform_device *pdev)
-@@ -140,10 +141,10 @@ static int __devinit bcm47xx_wdt_probe(s
+@@ -138,10 +139,10 @@ static int __devinit bcm47xx_wdt_probe(s
        if (!wdt)
                return -ENXIO;
  
index c08f0b1..568581f 100644 (file)
@@ -17,8 +17,8 @@
 +MODULE_PARM_DESC(timeout, "Watchdog time in seconds. (default="
                                __MODULE_STRING(WDT_DEFAULT_TIME) ")");
  
- #ifdef CONFIG_WATCHDOG_NOWAYOUT
-@@ -97,9 +97,9 @@ static int bcm47xx_wdt_soft_stop(struct
+ module_param(nowayout, bool, 0);
+@@ -95,9 +95,9 @@ static int bcm47xx_wdt_soft_stop(struct
  static int bcm47xx_wdt_soft_set_timeout(struct watchdog_device *wdd,
                                        unsigned int new_time)
  {
@@ -30,7 +30,7 @@
                return -EINVAL;
        }
  
-@@ -163,7 +163,7 @@ static int __devinit bcm47xx_wdt_probe(s
+@@ -161,7 +161,7 @@ static int __devinit bcm47xx_wdt_probe(s
                goto err_notifier;
  
        pr_info("BCM47xx Watchdog Timer enabled (%d seconds%s)\n",
index 3e67ba2..6970e10 100644 (file)
@@ -8,7 +8,7 @@
  
  static int timeout = WDT_DEFAULT_TIME;
  static bool nowayout = WATCHDOG_NOWAYOUT;
-@@ -52,6 +53,53 @@ static inline struct bcm47xx_wdt *bcm47x
+@@ -50,6 +51,53 @@ static inline struct bcm47xx_wdt *bcm47x
        return container_of(wdd, struct bcm47xx_wdt, wdd);
  }
  
@@ -62,7 +62,7 @@
  static void bcm47xx_wdt_soft_timer_tick(unsigned long data)
  {
        struct bcm47xx_wdt *wdt = (struct bcm47xx_wdt *)data;
-@@ -136,15 +184,22 @@ static struct watchdog_ops bcm47xx_wdt_s
+@@ -134,15 +182,22 @@ static struct watchdog_ops bcm47xx_wdt_s
  static int __devinit bcm47xx_wdt_probe(struct platform_device *pdev)
  {
        int ret;
@@ -88,7 +88,7 @@
        wdt->wdd.info = &bcm47xx_wdt_info;
        wdt->wdd.timeout = WDT_DEFAULT_TIME;
        ret = wdt->wdd.ops->set_timeout(&wdt->wdd, timeout);
-@@ -162,14 +217,16 @@ static int __devinit bcm47xx_wdt_probe(s
+@@ -160,14 +215,16 @@ static int __devinit bcm47xx_wdt_probe(s
        if (ret)
                goto err_notifier;