All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] watchdog: omap_wdt: early_enable module parameter
@ 2015-06-25 10:21 poeschel
  2015-06-25 13:46 ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: poeschel @ 2015-06-25 10:21 UTC (permalink / raw)
  To: wim, corbet, linux-doc, linux-watchdog, linux-kernel; +Cc: Lars Poeschel

From: Lars Poeschel <poeschel@lemonage.de>

Add a early_enable module parameter to the omap_wdt that starts the
watchdog on module insertion. The default value is 0 which does not
start the watchdog - which also does not change the behavior if the
parameter is not given.

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
---
 Documentation/watchdog/watchdog-parameters.txt | 1 +
 drivers/watchdog/omap_wdt.c                    | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/Documentation/watchdog/watchdog-parameters.txt b/Documentation/watchdog/watchdog-parameters.txt
index 692791c..837a4e2 100644
--- a/Documentation/watchdog/watchdog-parameters.txt
+++ b/Documentation/watchdog/watchdog-parameters.txt
@@ -208,6 +208,7 @@ nowayout: Watchdog cannot be stopped once started
 -------------------------------------------------
 omap_wdt:
 timer_margin: initial watchdog timeout (in seconds)
+early_enable: Watchdog is started on module insertion (default=0)
 -------------------------------------------------
 orion_wdt:
 heartbeat: Initial watchdog heartbeat in seconds
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 1e6be9e..29c5f33 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -53,6 +53,11 @@ static unsigned timer_margin;
 module_param(timer_margin, uint, 0);
 MODULE_PARM_DESC(timer_margin, "initial watchdog timeout (in seconds)");
 
+static bool early_enable;
+module_param(early_enable, bool, 0);
+MODULE_PARM_DESC(early_enable,
+	"Watchdog is started on module insertion (default=0)");
+
 struct omap_wdt_dev {
 	void __iomem    *base;          /* physical */
 	struct device   *dev;
@@ -269,6 +274,9 @@ static int omap_wdt_probe(struct platform_device *pdev)
 
 	pm_runtime_put_sync(wdev->dev);
 
+	if (early_enable)
+		omap_wdt_start(omap_wdt);
+
 	return 0;
 }
 
-- 
2.1.4


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

* Re: [PATCH v2] watchdog: omap_wdt: early_enable module parameter
  2015-06-25 10:21 [PATCH v2] watchdog: omap_wdt: early_enable module parameter poeschel
@ 2015-06-25 13:46 ` Guenter Roeck
  2015-06-30  5:56   ` Paul Gortmaker
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2015-06-25 13:46 UTC (permalink / raw)
  To: poeschel, wim, corbet, linux-doc, linux-watchdog, linux-kernel

On 06/25/2015 03:21 AM, poeschel@lemonage.de wrote:
> From: Lars Poeschel <poeschel@lemonage.de>
>
> Add a early_enable module parameter to the omap_wdt that starts the
> watchdog on module insertion. The default value is 0 which does not
> start the watchdog - which also does not change the behavior if the
> parameter is not given.
>
> Signed-off-by: Lars Poeschel <poeschel@lemonage.de>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>


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

* Re: [PATCH v2] watchdog: omap_wdt: early_enable module parameter
  2015-06-25 13:46 ` Guenter Roeck
@ 2015-06-30  5:56   ` Paul Gortmaker
       [not found]     ` <CAP=VYLr5wVMBdA76U0HKP2GTN07qiCkCTtBmFG5Z_bWE0QvT9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Gortmaker @ 2015-06-30  5:56 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: poeschel, wim, Jonathan Corbet, LKML doc, linux-watchdog, LKML,
	linux-next@vger.kernel.org

On Thu, Jun 25, 2015 at 9:46 AM, Guenter Roeck <linux@roeck-us.net> wrote:
> On 06/25/2015 03:21 AM, poeschel@lemonage.de wrote:
>>
>> From: Lars Poeschel <poeschel@lemonage.de>
>>
>> Add a early_enable module parameter to the omap_wdt that starts the
>> watchdog on module insertion. The default value is 0 which does not
>> start the watchdog - which also does not change the behavior if the
>> parameter is not given.
>>
>> Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
>
>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>

In case the info hasn't looped back around yet, this breaks the
omap builds in linux-next:

drivers/watchdog/omap_wdt.c:288:18: error: 'omap_wdt' undeclared
(first use in this function)

(Not sure how this could have ever worked as-is.)

http://kisskb.ellerman.id.au/kisskb/buildresult/12452335/

I see a patch has already been posted to arm-kernel but not
Cc'd to all originally involved so figured I'd mention it.

Paul.
--

>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH v2] watchdog: omap_wdt: early_enable module parameter
  2015-06-30  5:56   ` Paul Gortmaker
@ 2015-06-30  6:58         ` Wim Van Sebroeck
  0 siblings, 0 replies; 5+ messages in thread
From: Wim Van Sebroeck @ 2015-06-30  6:58 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: Guenter Roeck, poeschel-Xtl8qvBWbHwb1SvskN2V4Q, Jonathan Corbet,
	LKML doc, linux-watchdog-u79uwXL29TY76Z2rM5mHXA, LKML,
	linux-next-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Hi Paul,

> On Thu, Jun 25, 2015 at 9:46 AM, Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> wrote:
> > On 06/25/2015 03:21 AM, poeschel-Xtl8qvBWbHwb1SvskN2V4Q@public.gmane.org wrote:
> >>
> >> From: Lars Poeschel <poeschel-Xtl8qvBWbHwb1SvskN2V4Q@public.gmane.org>
> >>
> >> Add a early_enable module parameter to the omap_wdt that starts the
> >> watchdog on module insertion. The default value is 0 which does not
> >> start the watchdog - which also does not change the behavior if the
> >> parameter is not given.
> >>
> >> Signed-off-by: Lars Poeschel <poeschel-Xtl8qvBWbHwb1SvskN2V4Q@public.gmane.org>
> >
> >
> > Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
> 
> In case the info hasn't looped back around yet, this breaks the
> omap builds in linux-next:
> 
> drivers/watchdog/omap_wdt.c:288:18: error: 'omap_wdt' undeclared
> (first use in this function)
> 
> (Not sure how this could have ever worked as-is.)
> 
> http://kisskb.ellerman.id.au/kisskb/buildresult/12452335/
> 
> I see a patch has already been posted to arm-kernel but not
> Cc'd to all originally involved so figured I'd mention it.

It's fixed. The reason why we din't catch it was because of interference
with 'watchdog: omap: put struct watchdog_device into driver data'.

Kind regards,
Wim.

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2] watchdog: omap_wdt: early_enable module parameter
@ 2015-06-30  6:58         ` Wim Van Sebroeck
  0 siblings, 0 replies; 5+ messages in thread
From: Wim Van Sebroeck @ 2015-06-30  6:58 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: Guenter Roeck, poeschel, Jonathan Corbet, LKML doc,
	linux-watchdog, LKML, linux-next@vger.kernel.org

Hi Paul,

> On Thu, Jun 25, 2015 at 9:46 AM, Guenter Roeck <linux@roeck-us.net> wrote:
> > On 06/25/2015 03:21 AM, poeschel@lemonage.de wrote:
> >>
> >> From: Lars Poeschel <poeschel@lemonage.de>
> >>
> >> Add a early_enable module parameter to the omap_wdt that starts the
> >> watchdog on module insertion. The default value is 0 which does not
> >> start the watchdog - which also does not change the behavior if the
> >> parameter is not given.
> >>
> >> Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
> >
> >
> > Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> 
> In case the info hasn't looped back around yet, this breaks the
> omap builds in linux-next:
> 
> drivers/watchdog/omap_wdt.c:288:18: error: 'omap_wdt' undeclared
> (first use in this function)
> 
> (Not sure how this could have ever worked as-is.)
> 
> http://kisskb.ellerman.id.au/kisskb/buildresult/12452335/
> 
> I see a patch has already been posted to arm-kernel but not
> Cc'd to all originally involved so figured I'd mention it.

It's fixed. The reason why we din't catch it was because of interference
with 'watchdog: omap: put struct watchdog_device into driver data'.

Kind regards,
Wim.


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

end of thread, other threads:[~2015-06-30  6:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25 10:21 [PATCH v2] watchdog: omap_wdt: early_enable module parameter poeschel
2015-06-25 13:46 ` Guenter Roeck
2015-06-30  5:56   ` Paul Gortmaker
     [not found]     ` <CAP=VYLr5wVMBdA76U0HKP2GTN07qiCkCTtBmFG5Z_bWE0QvT9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-30  6:58       ` Wim Van Sebroeck
2015-06-30  6:58         ` Wim Van Sebroeck

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.