#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,56 +130,72 @@ static struct watchdog_ops bcm47xx_wdt_o
.set_timeout = bcm47xx_wdt_set_timeout,
};
-static void __exit bcm47xx_wdt_exit(void)
+static int __devexit bcm47xx_wdt_remove(struct platform_device *pdev)
{
-- watchdog_stop(&bcm47xx_wdt_wdd);
- watchdog_unregister_device(&bcm47xx_wdt_wdd);
+ struct bcm47xx_wdt *wdt = dev_get_platdata(&pdev->dev);
+
+MODULE_AUTHOR("Hauke Mehrtens <hauke@hauke-m.de>");
MODULE_DESCRIPTION("Watchdog driver for Broadcom BCM47xx");
MODULE_LICENSE("GPL");
---- /dev/null
+--- a/include/linux/bcm47xx_wdt.h
+++ b/include/linux/bcm47xx_wdt.h
-@@ -0,0 +1,27 @@
-+#ifndef LINUX_BCM47XX_WDT_H_
-+#define LINUX_BCM47XX_WDT_H_
-+
+@@ -1,7 +1,10 @@
+ #ifndef LINUX_BCM47XX_WDT_H_
+ #define LINUX_BCM47XX_WDT_H_
+
+#include <linux/notifier.h>
+#include <linux/timer.h>
-+#include <linux/types.h>
+ #include <linux/types.h>
+#include <linux/watchdog.h>
-+
-+
-+struct bcm47xx_wdt {
-+ u32 (*timer_set)(struct bcm47xx_wdt *, u32);
-+ u32 (*timer_set_ms)(struct bcm47xx_wdt *, u32);
-+
-+ void *driver_data;
+
+
+ struct bcm47xx_wdt {
+@@ -10,6 +13,12 @@ struct bcm47xx_wdt {
+ u32 max_timer_ms;
+
+ void *driver_data;
+
+ struct watchdog_device wdd;
+ struct notifier_block notifier;
+
+ struct timer_list soft_timer;
+ atomic_t soft_ticks;
-+};
-+
-+static inline void *bcm47xx_wdt_get_drvdata(struct bcm47xx_wdt *wdt)
-+{
-+ return wdt->driver_data;
-+}
-+#endif /* LINUX_BCM47XX_WDT_H_ */
+ };
+
+ static inline void *bcm47xx_wdt_get_drvdata(struct bcm47xx_wdt *wdt)