From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mx35_3ds: Add watchdog support
Date: Tue, 16 Nov 2010 07:38:18 +0100 [thread overview]
Message-ID: <20101116063818.GR8942@pengutronix.de> (raw)
In-Reply-To: <78127.99191.qm@web51001.mail.re2.yahoo.com>
Hi Fabio,
On Mon, Nov 15, 2010 at 09:31:34AM -0800, Fabio Estevam wrote:
> Hi Uwe and Wolfram,
>
> --- On Mon, 11/15/10, Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de> wrote:
>
> > From: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > Subject: Re: [PATCH] mx35_3ds: Add watchdog support
> > To: "Fabio Estevam" <fabioestevam@yahoo.com>
> > Cc: fabio.estevam at freescale.com, s.hauer at pengutronix.de, linux-arm-kernel at lists.infradead.org
> > Date: Monday, November 15, 2010, 1:52 PM
> > Hi Fabio,
> >
> > On Mon, Nov 15, 2010 at 06:31:09AM -0800, Fabio Estevam
> > wrote:
> > > mx35_3ds: Add watchdog support.
> > I just converted the mx3 watchdog device to dynamic
> > allocation.? Will
> > take care of mx35_3ds.
>
> Ok, understood.
>
> I have also started testing watchdog on MX51.
>
> As there is no watchdog clock entry in the CCM block on MX51 I thought on doing the following:
>
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index 2ee7dac..63f600c 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -270,10 +270,12 @@ static int __init imx2_wdt_probe(struct
> platform_device *pdev)
> return -ENOMEM;
> }
>
> - imx2_wdt.clk = clk_get_sys("imx-wdt.0", NULL);
> - if (IS_ERR(imx2_wdt.clk)) {
> - dev_err(&pdev->dev, "can't get Watchdog clock\n");
> - return PTR_ERR(imx2_wdt.clk);
> + if (!cpu_is_mx51()) {
> + imx2_wdt.clk = clk_get_sys("imx-wdt.0", NULL);
> + if (IS_ERR(imx2_wdt.clk)) {
> + dev_err(&pdev->dev, "can't get Watchdog clock\n");
> + return PTR_ERR(imx2_wdt.clk);
> + }
(Minor note: after your patch the brackets don't balance anymore.)
I wonder why the driver uses clk_get_sys("imx-wdt.0", NULL).
IMHO it should use clk_get(&pdev->dev, NULL). (For that to work we need
to register the clock using "imx2-wdt.0". (Or even better "imx2-wdt".))
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2010-11-16 6:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-15 14:31 [PATCH] mx35_3ds: Add watchdog support Fabio Estevam
2010-11-15 15:52 ` Uwe Kleine-König
2010-11-15 17:31 ` Fabio Estevam
2010-11-15 19:04 ` Russell King - ARM Linux
2010-11-16 6:38 ` Uwe Kleine-König [this message]
2010-11-16 9:25 ` Fabio Estevam
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=20101116063818.GR8942@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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.