All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Pisati <p.pisati@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] bcm2835_wdt: support for the BCM2835/2836 watchdog
Date: Fri, 10 Feb 2017 16:18:37 +0100	[thread overview]
Message-ID: <20170210151837.GA22442@harukaze> (raw)
In-Reply-To: <2765682.6PCLvXzOU7@sbruens-linux>

On Fri, Jan 27, 2017 at 04:20:10PM +0000, Br?ns, Stefan wrote:
> > ...
> > +
> >  __efi_runtime_data struct bcm2835_wdog_regs *wdog_regs =
> >  	(struct bcm2835_wdog_regs *)BCM2835_WDOG_PHYSADDR;
> > 
> > -void __efi_runtime reset_cpu(ulong addr)
> > +void __efi_runtime reset_cpu(ulong ticks)
> >  {
> > -	uint32_t rstc;
> > +	uint32_t rstc, timeout;
> > +
> > +	if (ticks == 0) {
> > +		hw_watchdog_disable();
> > +		timeout = RESET_TIMEOUT;
> 
> This is wrong. The efi runtime reset function calls this as reset_cpu(0), and 
> then tries to call hw_watchdog_disable, which is not marked as __efi_runtime.

Ok.
 
> Actually, I can see no reason the watchdog setup piggybacks on the reset_cpu 
> funtion.

Because there's a window after reset_cpu() is called but before real reset happens,
and if hw_watchdog_reset() is called in between, it breaks the reset procedure.

There must be a mechanism for reset_cpu() to disable the watchdog driver so it
won't interfere.

> 
> I think the rule is no new CONFIG_xxx options, but appropriate options in 
> KConfig.

I'll send a V2.
-- 
bye,
p.

  reply	other threads:[~2017-02-10 15:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27  9:59 [U-Boot] [PATCH] bcm2835: wdt: support for the bcm2835/2836 wdt Paolo Pisati
2017-01-27  9:59 ` [U-Boot] [PATCH] bcm2835_wdt: support for the BCM2835/2836 watchdog Paolo Pisati
2017-01-27 16:20   ` Brüns, Stefan
2017-02-10 15:18     ` Paolo Pisati [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-01-27 11:38 [U-Boot] [PATCH] bcm2835: wdt: support for the bcm2835/2836 wdt Paolo Pisati
2017-01-27 11:38 ` [U-Boot] [PATCH] bcm2835_wdt: support for the BCM2835/2836 watchdog Paolo Pisati
2017-02-10 16:28 [U-Boot] [PATCH] [V2] bcm2835: wdt: support for the bcm2835/2836 wdt Paolo Pisati
2017-02-10 16:28 ` [U-Boot] [PATCH] bcm2835_wdt: support for the BCM2835/2836 watchdog Paolo Pisati

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=20170210151837.GA22442@harukaze \
    --to=p.pisati@gmail.com \
    --cc=u-boot@lists.denx.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 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.