From: Sascha Hauer <s.hauer@pengutronix.de>
To: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/3] watchdog: add designware driver
Date: Mon, 26 Sep 2016 08:01:44 +0200 [thread overview]
Message-ID: <20160926060144.5otktcflay6wkeaz@pengutronix.de> (raw)
In-Reply-To: <1474547628-16751-2-git-send-email-s.trumtrar@pengutronix.de>
On Thu, Sep 22, 2016 at 02:33:47PM +0200, Steffen Trumtrar wrote:
> Port the linux v4.8-rc1 Synopsys DesignWare watchdog driver to barebox.
>
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> ---
> drivers/watchdog/Kconfig | 6 ++
> drivers/watchdog/Makefile | 1 +
> drivers/watchdog/dw_wdt.c | 194 ++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 201 insertions(+)
> create mode 100644 drivers/watchdog/dw_wdt.c
>
> + struct dw_wdt *dw_wdt = to_dw_wdt(wdd);
> +
> + writel(WDOG_CONTROL_REG_WDT_EN_MASK,
> + dw_wdt->regs + WDOG_CONTROL_REG_OFFSET);
> +
> + return 0;
> +}
> +
> +static int dw_wdt_stop(struct watchdog *wdd)
> +{
> + struct dw_wdt *dw_wdt = to_dw_wdt(wdd);
> +
> + if (IS_ERR(dw_wdt->rst)) {
> + pr_warn("No reset line. Will not stop.\n");
dev_warn
> + return PTR_ERR(dw_wdt->rst);
> + }
> +
> + reset_control_assert(dw_wdt->rst);
> + reset_control_deassert(dw_wdt->rst);
> +
> + return 0;
> +}
...
> +
> + ret = restart_handler_register(&dw_wdt->restart);
> + if (ret)
> + pr_warn("cannot register restart handler\n");
ditto
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2016-09-26 6:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 12:33 [PATCH 1/3] reset: import socfpga-reset driver from linux Steffen Trumtrar
2016-09-22 12:33 ` [PATCH 2/3] watchdog: add designware driver Steffen Trumtrar
2016-09-26 6:01 ` Sascha Hauer [this message]
2016-09-22 12:33 ` [PATCH 3/3] ARM: socfpga: dtsi: add dw-wdt reset lines Steffen Trumtrar
2016-09-26 5:58 ` [PATCH 1/3] reset: import socfpga-reset driver from linux Sascha Hauer
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=20160926060144.5otktcflay6wkeaz@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.trumtrar@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox