[PATCH 1/2] watchdog: dw_wdt: do not register restart handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The designware watchdog driver doesn't have a special reset function,
instead it only uses the regular watchdog to reset the SoC. Since
0ed7bb09f2ef7b ("watchdog: add option to provide fall-back restart handler")
the watchdog core provides the same functionality, so just drop the
restart functionality from the driver.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/watchdog/dw_wdt.c | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index 178e0a29f1..398bbfe05f 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -16,7 +16,6 @@
 #include <init.h>
 #include <io.h>
 #include <of.h>
-#include <restart.h>
 #include <watchdog.h>
 #include <linux/clk.h>
 #include <linux/err.h>
@@ -37,7 +36,6 @@
 
 struct dw_wdt {
 	void __iomem		*regs;
-	struct restart_handler	restart;
 	struct watchdog		wdd;
 	struct reset_control	*rst;
 	unsigned int		rate;
@@ -115,19 +113,6 @@ static int dw_wdt_set_timeout(struct watchdog *wdd, unsigned int top_s)
 	return 0;
 }
 
-static void __noreturn dw_wdt_restart_handle(struct restart_handler *rst)
-{
-	struct dw_wdt *dw_wdt;
-
-	dw_wdt = container_of(rst, struct dw_wdt, restart);
-
-	dw_wdt->wdd.set_timeout(&dw_wdt->wdd, -1);
-
-	mdelay(1000);
-
-	hang();
-}
-
 static int dw_wdt_drv_probe(struct device *dev)
 {
 	struct watchdog *wdd;
@@ -173,13 +158,6 @@ static int dw_wdt_drv_probe(struct device *dev)
 	if (ret)
 		goto out_disable_clk;
 
-	dw_wdt->restart.name = "dw_wdt";
-	dw_wdt->restart.restart = dw_wdt_restart_handle;
-
-	ret = restart_handler_register(&dw_wdt->restart);
-	if (ret)
-		dev_warn(dev, "cannot register restart handler\n");
-
 	if (dw_wdt->rst)
 		reset_control_deassert(dw_wdt->rst);
 	else
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux