Thread (11 messages) 11 messages, 6 authors, 2010-09-30
STALE5735d

[PATCH] OMAP2PLUS: WDT: Fix: Disable WDT after reset during init

From: Shilimkar, Santosh <hidden>
Date: 2010-09-30 17:05:05
Also in: linux-omap

-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-
owner at vger.kernel.org] On Behalf Of Varadarajan, Charulatha
Sent: Thursday, September 30, 2010 9:25 PM
To: Tony Lindgren; Cousson, Benoit
Cc: Kevin Hilman; Menon, Nishanth; wim at iguana.be; linux-
omap at vger.kernel.org; linux-watchdog at vger.kernel.org; linux-arm-
kernel at lists.infradead.org; paul at pwsan.com; Nayak, Rajendra; Basak, Partha
Subject: RE: [PATCH] OMAP2PLUS: WDT: Fix: Disable WDT after reset during
init

Tony/ Benoit,
quoted
quoted
I think that disabling it should be done only if the CONFIG_OMAP_WDT
is not set.
How about disabling is done always unless CONFIG_WATCHDOG_NOWAYOUT
is set?
As given in the patch description, this patch does a disable of watchdog
timer, during init, to avoid the system rebooting that happens due to
enabling of watchdog timer after a reset of the module (during hwmod init).

According to the default WDT registers values, the system reboot would
happen in ~10s if watchdog is enabled with default values. Hence, after
a WDT module reset during init, the watchdog has to be disabled within 10s
otherwise the system will keep rebooting.

Hence irrespective of CONFIG_WATCHDOG_NOWAYOUT/ CONFIG_OMAP_WDT,
the watchdog timer needs to be disabled after a WDT reset has happened.
One more option is to avoid the software reset using the CONFIG_OMAP_WDT
flag. Something like below.

--------------
static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
	.name		= "wd_timer2",
	.class		= &omap44xx_wd_timer_hwmod_class,
	.mpu_irqs	= omap44xx_wd_timer2_irqs,

+ #ifndef CONFIG_OMAP_WDT,
+ .flags		= HWMOD_INIT_NO_RESET,
+ #endif
	.mpu_irqs_cnt	= ARRAY_SIZE(omap44xx_wd_timer2_irqs),
	.main_clk	= "wd_timer2_fck",
	.prcm = {
		.omap4 = {
			.clkctrl_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL,
		},
	},
	.slaves		= omap44xx_wd_timer2_slaves,
	.slaves_cnt	= ARRAY_SIZE(omap44xx_wd_timer2_slaves),
	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};

Regards,
Santosh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help