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 --- ...watchdog-bcm47xx_wdt.c-rename-ops-methods.patch | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 target/linux/brcm47xx/patches-3.6/542-watchdog-bcm47xx_wdt.c-rename-ops-methods.patch (limited to 'target/linux/brcm47xx/patches-3.6/542-watchdog-bcm47xx_wdt.c-rename-ops-methods.patch') diff --git a/target/linux/brcm47xx/patches-3.6/542-watchdog-bcm47xx_wdt.c-rename-ops-methods.patch b/target/linux/brcm47xx/patches-3.6/542-watchdog-bcm47xx_wdt.c-rename-ops-methods.patch new file mode 100644 index 000000000..54956fd2d --- /dev/null +++ b/target/linux/brcm47xx/patches-3.6/542-watchdog-bcm47xx_wdt.c-rename-ops-methods.patch @@ -0,0 +1,90 @@ +--- a/drivers/watchdog/bcm47xx_wdt.c ++++ b/drivers/watchdog/bcm47xx_wdt.c +@@ -46,12 +46,13 @@ MODULE_PARM_DESC(nowayout, + __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); + #endif + ++ + static inline struct bcm47xx_wdt *bcm47xx_wdt_get(struct watchdog_device *wdd) + { + return container_of(wdd, struct bcm47xx_wdt, wdd); + } + +-static void bcm47xx_timer_tick(unsigned long data) ++static void bcm47xx_wdt_soft_timer_tick(unsigned long data) + { + 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 + } + } + +-static int bcm47xx_wdt_keepalive(struct watchdog_device *wdd) ++static int bcm47xx_wdt_soft_keepalive(struct watchdog_device *wdd) + { + struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); + +@@ -73,17 +74,17 @@ static int bcm47xx_wdt_keepalive(struct + return 0; + } + +-static int bcm47xx_wdt_start(struct watchdog_device *wdd) ++static int bcm47xx_wdt_soft_start(struct watchdog_device *wdd) + { + struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); + +- bcm47xx_wdt_keepalive(wdd); +- bcm47xx_timer_tick((unsigned long)wdt); ++ bcm47xx_wdt_soft_keepalive(wdd); ++ bcm47xx_wdt_soft_timer_tick((unsigned long)wdt); + + return 0; + } + +-static int bcm47xx_wdt_stop(struct watchdog_device *wdd) ++static int bcm47xx_wdt_soft_stop(struct watchdog_device *wdd) + { + struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); + +@@ -93,8 +94,8 @@ static int bcm47xx_wdt_stop(struct watch + return 0; + } + +-static int bcm47xx_wdt_set_timeout(struct watchdog_device *wdd, +- unsigned int new_time) ++static int bcm47xx_wdt_soft_set_timeout(struct watchdog_device *wdd, ++ unsigned int new_time) + { + 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 + return NOTIFY_DONE; + } + +-static struct watchdog_ops bcm47xx_wdt_ops = { ++static struct watchdog_ops bcm47xx_wdt_soft_ops = { + .owner = THIS_MODULE, +- .start = bcm47xx_wdt_start, +- .stop = bcm47xx_wdt_stop, +- .ping = bcm47xx_wdt_keepalive, +- .set_timeout = bcm47xx_wdt_set_timeout, ++ .start = bcm47xx_wdt_soft_start, ++ .stop = bcm47xx_wdt_soft_stop, ++ .ping = bcm47xx_wdt_soft_keepalive, ++ .set_timeout = bcm47xx_wdt_soft_set_timeout, + }; + + static int __devinit bcm47xx_wdt_probe(struct platform_device *pdev) +@@ -140,10 +141,10 @@ static int __devinit bcm47xx_wdt_probe(s + if (!wdt) + return -ENXIO; + +- setup_timer(&wdt->soft_timer, bcm47xx_timer_tick, ++ setup_timer(&wdt->soft_timer, bcm47xx_wdt_soft_timer_tick, + (long unsigned int)wdt); + +- wdt->wdd.ops = &bcm47xx_wdt_ops; ++ wdt->wdd.ops = &bcm47xx_wdt_soft_ops; + wdt->wdd.info = &bcm47xx_wdt_info; + wdt->wdd.timeout = WDT_DEFAULT_TIME; + ret = wdt->wdd.ops->set_timeout(&wdt->wdd, timeout); -- cgit v1.2.3