All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Bruno Thomsen <bruno.thomsen@gmail.com>,
	linux-rtc@vger.kernel.org, linux-watchdog@vger.kernel.org,
	a.zummo@towertech.it, wim@linux-watchdog.org, linux@roeck-us.net,
	bth@kamstrup.com
Subject: Re: [PATCH v3 4/5] rtc: pcf2127: add watchdog feature support
Date: Thu, 16 Jul 2020 20:18:16 +0200	[thread overview]
Message-ID: <20200716181816.GF3428@piout.net> (raw)
In-Reply-To: <20200716144705.o57m4r7ptmsm3m6n@pengutronix.de>

Hi,

On 16/07/2020 16:47:05+0200, Uwe Kleine-König wrote:
> Hello,
> 
> On Thu, Aug 22, 2019 at 03:19:35PM +0200, Bruno Thomsen wrote:
> > Add partial support for the watchdog functionality of
> > both PCF2127 and PCF2129 chips.
> 
> I have a board here with a pcf2127 that has the #RST pin
> not connected.
> 
> The problem this creates is: The bootloader arms the SoC's watchdog and
> jumps into Linux. The pcf2127 driver happens to load first, so watchdog0
> is provided by the RTC (but non-functional). Systemd is configured to
> feed the watchdog, but happens to feed the wrong one, so the machine
> resets shortly after it is up :-|
> 
> So I wonder if we need a dt property that tells the driver if the RST
> line is connected or not.
> 

I guess the current solution is to set WatchdogDevice to point to a link
that is updated by udev thus ensuring it points to the correct watchdog
device regardless of the probe order.

This would be similar to the /dev/rtc symlink, pointing to the systohc
RTC by default (even if I don't really like that heuristic).

What you suggest is somewhat okay but doesn't really solve the issue if
both watchdogs are functional and systemd still doesn't pick the one
that is armed by the bootloader.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2020-07-16 18:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 13:19 [PATCH v3 1/5] rtc: pcf2127: convert to devm_rtc_allocate_device Bruno Thomsen
2019-08-22 13:19 ` [PATCH v3 2/5] rtc: pcf2127: cleanup register and bit defines Bruno Thomsen
2019-08-22 21:27   ` Alexandre Belloni
2019-08-22 13:19 ` [PATCH v3 3/5] rtc: pcf2127: bugfix: read rtc disables watchdog Bruno Thomsen
2019-08-22 21:28   ` Alexandre Belloni
2019-08-22 13:19 ` [PATCH v3 4/5] rtc: pcf2127: add watchdog feature support Bruno Thomsen
2019-08-22 14:11   ` Guenter Roeck
2019-08-22 21:28   ` Alexandre Belloni
2020-07-16 14:47   ` Uwe Kleine-König
2020-07-16 18:18     ` Alexandre Belloni [this message]
2020-07-17  6:21       ` Uwe Kleine-König
2019-08-22 13:19 ` [PATCH v3 5/5] rtc: pcf2127: add tamper detection support Bruno Thomsen
2019-08-22 21:29   ` Alexandre Belloni
2019-08-22 21:26 ` [PATCH v3 1/5] rtc: pcf2127: convert to devm_rtc_allocate_device Alexandre Belloni

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=20200716181816.GF3428@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=a.zummo@towertech.it \
    --cc=bruno.thomsen@gmail.com \
    --cc=bth@kamstrup.com \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=u.kleine-koenig@pengutronix.de \
    --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 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.