[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <551B6B04.1090507@roeck-us.net>
Date: Tue, 31 Mar 2015 20:50:28 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Andrew Bresticker <abrestic@...omium.org>,
Wim Van Sebroeck <wim@...ana.be>
CC: linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org,
Naidu Tellapati <naidu.tellapati@...tec.com>,
Ezequiel Garcia <ezequiel.garcia@...tec.com>
Subject: Re: [PATCH 3/4] watchdog: imgpdc: Set timeout before starting watchdog
On 03/31/2015 11:49 AM, Andrew Bresticker wrote:
> From: Naidu Tellapati <naidu.tellapati@...tec.com>
>
> Set up the watchdog for the specified timeout before attempting to start it.
>
> Signed-off-by: Naidu Tellapati <naidu.tellapati@...tec.com>
> Signed-off-by: Andrew Bresticker <abrestic@...omium.org>
> Cc: Ezequiel Garcia <ezequiel.garcia@...tec.com>
> ---
> drivers/watchdog/imgpdc_wdt.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/watchdog/imgpdc_wdt.c b/drivers/watchdog/imgpdc_wdt.c
> index f3f65ac..aef3596 100644
> --- a/drivers/watchdog/imgpdc_wdt.c
> +++ b/drivers/watchdog/imgpdc_wdt.c
> @@ -106,6 +106,8 @@ static int pdc_wdt_start(struct watchdog_device *wdt_dev)
> unsigned int val;
> struct pdc_wdt_dev *wdt = watchdog_get_drvdata(wdt_dev);
>
> + pdc_wdt_set_timeout(&wdt->wdt_dev, wdt->wdt_dev.timeout);
> +
> val = readl(wdt->base + PDC_WDT_CONFIG);
> val |= PDC_WDT_CONFIG_ENABLE;
> writel(val, wdt->base + PDC_WDT_CONFIG);
>
It might be better to provide a helper function that doesn't set wdt->wdt_dev.timeout
again, or to just set the timeout with the write to PDC_WDT_CONFIG when starting
the watchdog.
Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists