<div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 19, 2012 at 5:06 PM, Jason Cooper <span dir="ltr"><<a href="mailto:jason@lakedaemon.net" target="_blank">jason@lakedaemon.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class=""><div class="h5">On Mon, Nov 19, 2012 at 03:10:38PM +0100, Fabio Porcedda wrote:<br>
> Only compile tested.<br>
><br>
> Signed-off-by: Fabio Porcedda <<a href="mailto:fabio.porcedda@gmail.com">fabio.porcedda@gmail.com</a>><br>
> Cc: Jason Cooper <<a href="mailto:jason@lakedaemon.net">jason@lakedaemon.net</a>><br>
> Cc: Andrew Lunn <<a href="mailto:andrew@lunn.ch">andrew@lunn.ch</a>><br>
> ---<br>
> Documentation/devicetree/bindings/watchdog/marvel.txt | 5 +++++<br>
> drivers/watchdog/orion_wdt.c | 8 +++-----<br>
> 2 files changed, 8 insertions(+), 5 deletions(-)<br>
><br>
> diff --git a/Documentation/devicetree/bindings/watchdog/marvel.txt b/Documentation/devicetree/bindings/watchdog/marvel.txt<br>
> index 0b2503a..5dc8d30 100644<br>
> --- a/Documentation/devicetree/bindings/watchdog/marvel.txt<br>
> +++ b/Documentation/devicetree/bindings/watchdog/marvel.txt<br>
> @@ -5,10 +5,15 @@ Required Properties:<br>
> - Compatibility : "marvell,orion-wdt"<br>
> - reg : Address of the timer registers<br>
><br>
> +Optional properties:<br>
> +<br>
> +- timeout-sec : Contains the watchdog timeout in seconds<br>
> +<br>
> Example:<br>
><br>
> wdt@20300 {<br>
> compatible = "marvell,orion-wdt";<br>
> reg = <0x20300 0x28>;<br>
> + timeout-sec = <10>;<br>
> status = "okay";<br>
> };<br>
> diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c<br>
> index c20f96b..446a3e9 100644<br>
> --- a/drivers/watchdog/orion_wdt.c<br>
> +++ b/drivers/watchdog/orion_wdt.c<br>
> @@ -162,12 +162,10 @@ static int __devinit orion_wdt_probe(struct platform_device *pdev)<br>
><br>
> wdt_max_duration = WDT_MAX_CYCLE_COUNT / wdt_tclk;<br>
><br>
> - if ((heartbeat < 1) || (heartbeat > wdt_max_duration))<br>
> - heartbeat = wdt_max_duration;<br>
> -<br>
> - orion_wdt.timeout = heartbeat;<br>
> orion_wdt.min_timeout = 1;<br>
> + orion_wdt.timeout = wdt_max_duration;<br>
> orion_wdt.max_timeout = wdt_max_duration;<br>
> + watchdog_init_timeout(&orion_wdt, heartbeat, pdev->dev.of_node);<br>
<br>
</div></div>Hi Fabio,<br>
<br>
There are many boards using pdata, !CONFIG_OF. Have you compile-tested<br>
this without CONFIG_OF?<br></blockquote><div><br>Hi Jason,<br><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
thx,<br>
<br>
Jason.<br>
<div class="im"><br>
><br>
> watchdog_set_nowayout(&orion_wdt, nowayout);<br>
> ret = watchdog_register_device(&orion_wdt);<br>
> @@ -177,7 +175,7 @@ static int __devinit orion_wdt_probe(struct platform_device *pdev)<br>
> }<br>
><br>
> pr_info("Initial timeout %d sec%s\n",<br>
> - heartbeat, nowayout ? ", nowayout" : "");<br>
> + orion_wdt.timeout, nowayout ? ", nowayout" : "");<br>
> return 0;<br>
> }<br>
><br>
> --<br>
> 1.8.0<br>
><br>
><br>
</div>> _______________________________________________<br>
> linux-arm-kernel mailing list<br>
> <a href="mailto:linux-arm-kernel@lists.infradead.org">linux-arm-kernel@lists.infradead.org</a><br>
> <a href="http://lists.infradead.org/mailman/listinfo/linux-arm-kernel" target="_blank">http://lists.infradead.org/mailman/listinfo/linux-arm-kernel</a><br>
</blockquote></div><br>I've tested with and without the CONFIG_OF define.<br><br>The first time I’ve used the kirkwood_defconfig without modifications,<br>the second time I’ve enabled only the CONFIG_MACH_SHEEVAPLUG and disabled USE_OF.<br clear="all">
<br>In both cases the orion_wdt driver compile without any warning.<br><br>Thanks for the review.<br><br>Best regards<br>-- <br>Fabio Porcedda<br><br>
</div>