From: Guenter Roeck <linux@roeck-us.net>
To: Lee Jones <lee.jones@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, wim@iguana.be,
linux-watchdog@vger.kernel.org, kernel@stlinux.com,
David Paris <david.paris@st.com>
Subject: Re: [4/4] watchdog: st_wdt: Add new driver for ST's LPC Watchdog
Date: Tue, 13 Jan 2015 06:23:41 -0800 [thread overview]
Message-ID: <20150113142341.GA15707@roeck-us.net> (raw)
In-Reply-To: <1414077524-6469-5-git-send-email-lee.jones@linaro.org>
On Thu, Oct 23, 2014 at 04:18:44PM +0100, Lee Jones wrote:
> Signed-off-by: David Paris <david.paris@st.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Digging myself out of my hole. Sorry for the laaaate reply.
> ---
> drivers/watchdog/Kconfig | 16 +++
> drivers/watchdog/Makefile | 1 +
> drivers/watchdog/st_wdt.c | 317 ++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 334 insertions(+)
> create mode 100644 drivers/watchdog/st_wdt.c
>
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index f57312f..c8abf57 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -432,6 +432,22 @@ config SIRFSOC_WATCHDOG
> Support for CSR SiRFprimaII and SiRFatlasVI watchdog. When
> the watchdog triggers the system will be reset.
>
> +config ST_WATCHDOG
> + tristate "STMicroelectronics LPC Watchdog"
> + depends on ARCH_STI && OF
> + depends on !RTC_DRV_ST_LPC
RTC_DRV_ST_LPC is not in mainline nor in -next. Is this still current ?
> + select WATCHDOG_CORE
> + help
> + Say Y here to include Watchdog timer support for the watchdog
> + existing in the LPC of STMicroelectronics SOCs.
> + !!! BE CARREFUL !!!
> + This driver shares hardware resources with RTC Alarm part of the
> + LPC. Both LPC Watchdog driver and LPC RTC driver cannot be
> + used together.
> +
Arnd has asked if/how this is enforced by the code. Was this ever resolved ?
> + To compile this driver as a module, choose M here: the
> + module will be called st-wdt.
> +
[ ... ]
> + watchdog_set_drvdata(&st_wdog_dev, st_wdog);
> + watchdog_set_nowayout(&st_wdog_dev, WATCHDOG_NOWAYOUT);
> +
> + /* Init Watchdog timeout with value in DT */
> + ret = watchdog_init_timeout(&st_wdog_dev, 0, &pdev->dev);
> + if (ret) {
> + dev_err(&pdev->dev, "Unable to initialise watchdog timeout\n");
Missing clk_disable_unprepare().
> + return ret;
> + }
> +
> + ret = watchdog_register_device(&st_wdog_dev);
> + if (ret) {
> + dev_err(&pdev->dev, "Unable to register watchdog\n");
> + clk_disable_unprepare(clk);
> + return ret;
> + }
> +
> + st_wdog_setup(st_wdog, true);
> +
> + dev_info(&pdev->dev, "LPC Watchdog driver registered, reset type is %s",
> + st_wdog->warm_reset ? "warm" : "cold");
Missing newline.
Guenter
WARNING: multiple messages have this Message-ID (diff)
From: linux@roeck-us.net (Guenter Roeck)
To: linux-arm-kernel@lists.infradead.org
Subject: [4/4] watchdog: st_wdt: Add new driver for ST's LPC Watchdog
Date: Tue, 13 Jan 2015 06:23:41 -0800 [thread overview]
Message-ID: <20150113142341.GA15707@roeck-us.net> (raw)
In-Reply-To: <1414077524-6469-5-git-send-email-lee.jones@linaro.org>
On Thu, Oct 23, 2014 at 04:18:44PM +0100, Lee Jones wrote:
> Signed-off-by: David Paris <david.paris@st.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Digging myself out of my hole. Sorry for the laaaate reply.
> ---
> drivers/watchdog/Kconfig | 16 +++
> drivers/watchdog/Makefile | 1 +
> drivers/watchdog/st_wdt.c | 317 ++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 334 insertions(+)
> create mode 100644 drivers/watchdog/st_wdt.c
>
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index f57312f..c8abf57 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -432,6 +432,22 @@ config SIRFSOC_WATCHDOG
> Support for CSR SiRFprimaII and SiRFatlasVI watchdog. When
> the watchdog triggers the system will be reset.
>
> +config ST_WATCHDOG
> + tristate "STMicroelectronics LPC Watchdog"
> + depends on ARCH_STI && OF
> + depends on !RTC_DRV_ST_LPC
RTC_DRV_ST_LPC is not in mainline nor in -next. Is this still current ?
> + select WATCHDOG_CORE
> + help
> + Say Y here to include Watchdog timer support for the watchdog
> + existing in the LPC of STMicroelectronics SOCs.
> + !!! BE CARREFUL !!!
> + This driver shares hardware resources with RTC Alarm part of the
> + LPC. Both LPC Watchdog driver and LPC RTC driver cannot be
> + used together.
> +
Arnd has asked if/how this is enforced by the code. Was this ever resolved ?
> + To compile this driver as a module, choose M here: the
> + module will be called st-wdt.
> +
[ ... ]
> + watchdog_set_drvdata(&st_wdog_dev, st_wdog);
> + watchdog_set_nowayout(&st_wdog_dev, WATCHDOG_NOWAYOUT);
> +
> + /* Init Watchdog timeout with value in DT */
> + ret = watchdog_init_timeout(&st_wdog_dev, 0, &pdev->dev);
> + if (ret) {
> + dev_err(&pdev->dev, "Unable to initialise watchdog timeout\n");
Missing clk_disable_unprepare().
> + return ret;
> + }
> +
> + ret = watchdog_register_device(&st_wdog_dev);
> + if (ret) {
> + dev_err(&pdev->dev, "Unable to register watchdog\n");
> + clk_disable_unprepare(clk);
> + return ret;
> + }
> +
> + st_wdog_setup(st_wdog, true);
> +
> + dev_info(&pdev->dev, "LPC Watchdog driver registered, reset type is %s",
> + st_wdog->warm_reset ? "warm" : "cold");
Missing newline.
Guenter
next prev parent reply other threads:[~2015-01-13 14:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 15:18 [PATCH v4 0/4] watchdog: Introduce new driver to support ST's Watchdog Lee Jones
2014-10-23 15:18 ` Lee Jones
2014-10-23 15:18 ` [PATCH 1/4] ARM: STi: DT: STiH407: Add Device Tree node for LPC Watchdog Lee Jones
2014-10-23 15:18 ` Lee Jones
2014-10-23 15:18 ` [PATCH 2/4] ARM: multi_v7_defconfig: Enable support for ST's " Lee Jones
2014-10-23 15:18 ` Lee Jones
2014-10-23 15:18 ` [PATCH 3/4] watchdog: st_wdt: Provide binding documentation for ST's LPC Watchdog driver Lee Jones
2014-10-23 15:18 ` Lee Jones
2014-10-23 15:18 ` Lee Jones
2014-10-23 15:18 ` [PATCH 4/4] watchdog: st_wdt: Add new driver for ST's LPC Watchdog Lee Jones
2014-10-23 15:18 ` Lee Jones
2014-10-23 15:23 ` Arnd Bergmann
2014-10-23 15:23 ` Arnd Bergmann
2015-01-13 14:23 ` Guenter Roeck [this message]
2015-01-13 14:23 ` [4/4] " Guenter Roeck
2015-01-13 14:32 ` David Paris
2015-01-13 14:32 ` David Paris
2015-01-13 14:49 ` Guenter Roeck
2015-01-13 14:49 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150113142341.GA15707@roeck-us.net \
--to=linux@roeck-us.net \
--cc=david.paris@st.com \
--cc=kernel@stlinux.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.