linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Brandt <Chris.Brandt@renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Linux Watchdog Mailing List <linux-watchdog@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Simon Horman <horms+renesas@verge.net.au>
Subject: RE: [PATCH] watchdog: rza_wdt: Extend clock sources for RZ/A2
Date: Thu, 6 Sep 2018 12:44:42 +0000	[thread overview]
Message-ID: <TY1PR01MB15628F6B1EE72F7CCB4307938A010@TY1PR01MB1562.jpnprd01.prod.outlook.com> (raw)
Message-ID: <20180906124442.Ox0KukL_zPV-N7h11hx_rt7eMa_rzR2YSKPj2UpC5Nk@z> (raw)
In-Reply-To: <CAMuHMdUK7OSYwE85F-1Pw4gQfDR9JJ5-_cPCk=BRiV5pzt=DCw@mail.gmail.com>

Hi Geert,

On Thursday, September 06, 2018, Geert Uytterhoeven wrote:
> Thanks for your patch!

Thank you for your review.

> "timeout * rate" may overflow
> DIV_ROUND_UP()?
OK.

> > +       pr_debug("%s: timeout set to %d (WTCNT=%d)\n", __func__,
> 
> %u for unsigned.
OK.


> > +       if (of_device_is_compatible(np, "renesas,r7s9210-wdt"))
> > +               priv->ext_cks = true;
> 
> That's not the proper way to support multiple devices.
> Please add an entry for "renesas,r7s9210-wdt" to rza_wdt_of_match[].
> "renesas,r7s9210-wdt" must be documented in the DT bindings.
> 
> I suggest storing cks in rza_wdt_of_match[].data, and retrieving it with
> of_device_get_match_data() in your probe function, so you can use that to
> differentiate, 

OK, I will change to that.

> and get rid of the ext_cks flag.

I still need to keep track if it's a RZ/A1 or RZ/A2 (ext_cks) for 
functions outside of probe (rza_wdt_calc_timeout).

> BTW, is the RZ/A2 WDT compatible with the RZ/A1 WDT, i.e. does it work
> with the unmodified driver? If not, "renesas,rza-wdt" must not be used as
> a
> fallback.

I would say it is not, because the dividers are different (meaning the 
calculated timeouts would not be correct).

Thanks,
Chris


  reply	other threads:[~2018-09-06 17:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05 17:37 [PATCH] watchdog: rza_wdt: Extend clock sources for RZ/A2 Chris Brandt
2018-09-06 10:07 ` Geert Uytterhoeven
2018-09-06 12:44   ` Chris Brandt [this message]
2018-09-06 12:44     ` Chris Brandt
2018-09-06 12:48     ` Geert Uytterhoeven
2018-09-06 12:51       ` Chris Brandt
2018-09-06 16:11     ` Chris Brandt

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=TY1PR01MB15628F6B1EE72F7CCB4307938A010@TY1PR01MB1562.jpnprd01.prod.outlook.com \
    --to=chris.brandt@renesas.com \
    --cc=geert@linux-m68k.org \
    --cc=horms+renesas@verge.net.au \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=wim@linux-watchdog.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).