# CONFIG_USB_HCD_SSB is not set
CONFIG_USB_SUPPORT=y
CONFIG_WATCHDOG_CORE=y
-CONFIG_WATCHDOG_NOWAYOUT=y
CONFIG_ZONE_DMA_FLAG=0
#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
}
}
{
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");
#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;
} 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,
};
--- 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)
{
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
}
}
{
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;
}
{
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;
}
{
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;
}
};
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;
+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)
{
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",
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);
}
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;
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;