From: baruch@tkos.co.il (Baruch Siach)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] watchdog: digicolor: driver for Conexant Digicolor CX92755 SoC
Date: Mon, 23 Mar 2015 08:17:25 +0200 [thread overview]
Message-ID: <20150323061725.GK2825@tarshish> (raw)
In-Reply-To: <550FA9A4.5010304@roeck-us.net>
Hi Guenter,
Adding LKML to Cc.
On Sun, Mar 22, 2015 at 10:50:28PM -0700, Guenter Roeck wrote:
> On 03/22/2015 10:33 PM, Baruch Siach wrote:
> >>>>>+ wdt->restart_handler.notifier_call = dc_restart_handler;
> >>>>>+ wdt->restart_handler.priority = 128;
> >>>>
> >>>>Is 128 intentional, ie is this the expected reset method for this platform ?
> >>>>If not, it may be better to select a lower priority (eg 64). Using a watchdog
> >>>>to reset a system should in general be a method of last resort.
> >>>
> >>>Copied this value from imx2_wdt. grep indicates that almost all other watchdog
> >>>drivers implementing restart_handler use priority of 128 (except bcm47xx_wdt).
> >>>What is the policy here?
> >>
> >>The policy is to do what is sensible for the platform. That can only be decided
> >>on a case-by-case basis. The documentation suggests to use 128 for "Default restart
> >>handler; use if no other restart handler is expected to be available, and/or if
> >>restart functionality is sufficient to restart the entire system".
> >>
> >>So if this is the only means expected to be available to reset the system
> >>for this architecture/platform, and if the watchdog resets the entire system
> >>(not just the CPU), 128 may be ok to use. If, however, there may be other
> >>means to reset the system, such as a GPIO pin, maybe not.
> >
> >This driver is for a SoC hardware block. The restart_handler priority level is
> >hard coded in the drivers, and should thus work reasonably well for all its
> >users. The fact that the common priority level is 128, is significant in this
> >case IMO (as apposed to issues discussed above). Systems designers are likely
> >take this priority level into account in their designs. If this does not match
> >the documentation, then documentation needs to change to reflect reality.
>
> Seems to me you are arguing (again) that it is ok to use priority 128 not
> because of merit, but because others do it as well. As you may have noticed,
> I kind of dislike that line of argument. Actually, I don't consider it to be
> a valid argument in the first place.
I fully agree with you on other cases as I acknowledged earlier, but I
disagree here. The only merit of priority 128 is how it is accepted. This
priority level has no technical significance in or by itself. Our only
guidance for choosing the "right" level is what others do. That's my opinion,
at least.
At the technical level, this watchdog indirectly generates an external reset
signal that should be used to reset the entire system. This seems to be the
case on the Equinox evaluation board, which is the system I test this driver
on. I believe this conforms to the documented behaviour for the 128 priority
level.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
prev parent reply other threads:[~2015-03-23 6:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-22 12:40 [PATCH 1/2] watchdog: digicolor: document device tree binding Baruch Siach
2015-03-22 12:40 ` [PATCH 2/2] watchdog: digicolor: driver for Conexant Digicolor CX92755 SoC Baruch Siach
2015-03-22 16:59 ` Guenter Roeck
2015-03-22 18:08 ` Baruch Siach
2015-03-22 18:59 ` Guenter Roeck
2015-03-23 5:33 ` Baruch Siach
2015-03-23 5:50 ` Guenter Roeck
2015-03-23 6:17 ` Baruch Siach [this message]
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=20150323061725.GK2825@tarshish \
--to=baruch@tkos.co.il \
--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 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).