All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] watchdog: imx2_wdt: Do not clear IMX2_WDT_WCR_WDE
@ 2011-09-19 18:23 Fabio Estevam
  2011-09-19 18:24 ` [PATCH 2/2] watchdog: imx2_wdt: Disable watchdog during low-power modes Fabio Estevam
  2011-09-21 13:25 ` [PATCH 1/2] watchdog: imx2_wdt: Do not clear IMX2_WDT_WCR_WDE Wolfram Sang
  0 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2011-09-19 18:23 UTC (permalink / raw)
  To: linux-watchdog; +Cc: kernel, wim, Fabio Estevam

i.MX reference manual states that software can only write "1" into the WDE bit.

Remove the line that sets 0 to this bit and while at it remove an unneeded extra 
write to register WCR.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/watchdog/imx2_wdt.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index b8ef2c6..19df82d 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -89,13 +89,10 @@ static inline void imx2_wdt_setup(void)
 	val &= ~IMX2_WDT_WCR_WT;
 	/* Generate reset if WDOG times out */
 	val &= ~IMX2_WDT_WCR_WRE;
-	/* Keep Watchdog Disabled */
-	val &= ~IMX2_WDT_WCR_WDE;
+
 	/* Set the watchdog's Time-Out value */
 	val |= WDOG_SEC_TO_COUNT(imx2_wdt.timeout);
 
-	__raw_writew(val, imx2_wdt.base + IMX2_WDT_WCR);
-
 	/* enable the watchdog */
 	val |= IMX2_WDT_WCR_WDE;
 	__raw_writew(val, imx2_wdt.base + IMX2_WDT_WCR);
-- 
1.6.0.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-09 22:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-19 18:23 [PATCH 1/2] watchdog: imx2_wdt: Do not clear IMX2_WDT_WCR_WDE Fabio Estevam
2011-09-19 18:24 ` [PATCH 2/2] watchdog: imx2_wdt: Disable watchdog during low-power modes Fabio Estevam
2011-09-21 13:27   ` Wolfram Sang
2011-11-09 16:58     ` Fabio Estevam
2011-11-09 22:04       ` Wolfram Sang
2011-09-21 13:25 ` [PATCH 1/2] watchdog: imx2_wdt: Do not clear IMX2_WDT_WCR_WDE Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.