* [PATCH 1/2] watchdog: imxwd: Do not use mdelay when barebox is already shut down
@ 2015-08-26 6:19 Sascha Hauer
2015-08-26 6:19 ` [PATCH 2/2] watchdog: imxwd: remove remove callback Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2015-08-26 6:19 UTC (permalink / raw)
To: Barebox List
We should not call API functions when barebox is shut down. This may
be the case in the restart handler. Simply drop the mdelay.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/watchdog/imxwd.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c
index 5ffbac7..ef64e4e 100644
--- a/drivers/watchdog/imxwd.c
+++ b/drivers/watchdog/imxwd.c
@@ -128,8 +128,6 @@ void __noreturn reset_cpu(unsigned long addr)
if (reset_wd)
reset_wd->ops->set_timeout(reset_wd, -1);
- mdelay(1000);
-
hang();
}
--
2.4.6
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] watchdog: imxwd: remove remove callback
2015-08-26 6:19 [PATCH 1/2] watchdog: imxwd: Do not use mdelay when barebox is already shut down Sascha Hauer
@ 2015-08-26 6:19 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-08-26 6:19 UTC (permalink / raw)
To: Barebox List
The imxwd is for resetting the system, so we should not unregister it
during shutdown_barebox() as it may leave us without a restart handler.
Only a bug (not setting reset_wd to NULL in remove()) made the whole
thing work.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/watchdog/imxwd.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c
index ef64e4e..31c6a2c 100644
--- a/drivers/watchdog/imxwd.c
+++ b/drivers/watchdog/imxwd.c
@@ -215,17 +215,6 @@ on_error:
return ret;
}
-static void imx_wd_remove(struct device_d *dev)
-{
- struct imx_wd *priv = dev->priv;
-
- if (IS_ENABLED(CONFIG_WATCHDOG_IMX))
- watchdog_deregister(&priv->wd);
-
- if (reset_wd && reset_wd != priv)
- free(priv);
-}
-
static const struct imx_wd_ops imx21_wd_ops = {
.set_timeout = imx21_watchdog_set_timeout,
.init = imx21_wd_init,
@@ -262,7 +251,6 @@ static struct platform_device_id imx_wdt_ids[] = {
static struct driver_d imx_wd_driver = {
.name = "imx-watchdog",
.probe = imx_wd_probe,
- .remove = imx_wd_remove,
.of_compatible = DRV_OF_COMPAT(imx_wdt_dt_ids),
.id_table = imx_wdt_ids,
};
--
2.4.6
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-26 6:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-26 6:19 [PATCH 1/2] watchdog: imxwd: Do not use mdelay when barebox is already shut down Sascha Hauer
2015-08-26 6:19 ` [PATCH 2/2] watchdog: imxwd: remove remove callback Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox