From 793d448a51b53d81e2dbd58a5865a204de92ad34 Mon Sep 17 00:00:00 2001 From: Pavel Kubelun Date: Fri, 4 Nov 2016 02:12:32 +0300 Subject: ipq806x: backport upstream wdt driver Signed-off-by: Pavel Kubelun --- ...ta-parameters-to-restart-handler-callback.patch | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 target/linux/ipq806x/patches-4.4/010-3-watchdog-Add-action-and-data-parameters-to-restart-handler-callback.patch (limited to 'target/linux/ipq806x/patches-4.4/010-3-watchdog-Add-action-and-data-parameters-to-restart-handler-callback.patch') diff --git a/target/linux/ipq806x/patches-4.4/010-3-watchdog-Add-action-and-data-parameters-to-restart-handler-callback.patch b/target/linux/ipq806x/patches-4.4/010-3-watchdog-Add-action-and-data-parameters-to-restart-handler-callback.patch new file mode 100644 index 0000000000..7ceff32caa --- /dev/null +++ b/target/linux/ipq806x/patches-4.4/010-3-watchdog-Add-action-and-data-parameters-to-restart-handler-callback.patch @@ -0,0 +1,51 @@ +rom 4d8b229d5ea610affe672e919021e9d02cd877da Mon Sep 17 00:00:00 2001 +From: Guenter Roeck +Date: Fri, 26 Feb 2016 17:32:49 -0800 +Subject: watchdog: Add 'action' and 'data' parameters to restart handler + callback + +The 'action' (or restart mode) and data parameters may be used by restart +handlers, so they should be passed to the restart callback functions. + +Cc: Sylvain Lemieux +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +--- + drivers/watchdog/qcom-wdt.c | 3 ++- + drivers/watchdog/watchdog_core.c | 2 +- + include/linux/watchdog.h | 2 +- + +--- a/drivers/watchdog/qcom-wdt.c ++++ b/drivers/watchdog/qcom-wdt.c +@@ -70,7 +70,8 @@ static int qcom_wdt_set_timeout(struct w + return qcom_wdt_start(wdd); + } + +-static int qcom_wdt_restart(struct watchdog_device *wdd) ++static int qcom_wdt_restart(struct watchdog_device *wdd, unsigned long action, ++ void *data) + { + struct qcom_wdt *wdt = to_qcom_wdt(wdd); + u32 timeout; +--- a/drivers/watchdog/watchdog_core.c ++++ b/drivers/watchdog/watchdog_core.c +@@ -164,7 +164,7 @@ static int watchdog_restart_notifier(str + + int ret; + +- ret = wdd->ops->restart(wdd); ++ ret = wdd->ops->restart(wdd, action, data); + if (ret) + return NOTIFY_BAD; + +--- a/include/linux/watchdog.h ++++ b/include/linux/watchdog.h +@@ -46,7 +46,7 @@ struct watchdog_ops { + unsigned int (*status)(struct watchdog_device *); + int (*set_timeout)(struct watchdog_device *, unsigned int); + unsigned int (*get_timeleft)(struct watchdog_device *); +- int (*restart)(struct watchdog_device *); ++ int (*restart)(struct watchdog_device *, unsigned long, void *); + long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long); + }; + -- cgit v1.2.3