public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: ame <ayman@austin.rr.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] ppc44x - watchdog timers reboots during the image loading
Date: Fri, 1 Oct 2010 10:36:39 -0500	[thread overview]
Message-ID: <20101001153639.GA28486@crust.elkhashab.com> (raw)
In-Reply-To: <20101001143755.GA28063@crust.elkhashab.com>

On Fri, Oct 01, 2010 at 09:37:55AM -0500, ame wrote:
> On Fri, Oct 01, 2010 at 03:35:14PM +0200, Stefan Roese wrote:
> > On Thursday 30 September 2010 22:15:04 ame wrote:
> > > On my 460ex board, i've tried to add CONFIG_WATCHDOG to the config and it
> > > appears to work until the board tries to boot.  At that point I can count
> > > down about 10 seconds and the reboot happens.  The 10s correlates with
> > > what I think the watchdog is being set to.  I've inserted some
> > > WATCHDOG_RESET() invocations wrapping memmove_wd (which admittedly should
> > > not be needed), but it does not have an effect.  The last message I see is
> > > ...
> > > 
> > >    Verifying Checksum ... OK
> > > ## Flattened Device Tree blob at ff3e0000
> > >    Booting using the fdt blob at 0xff3e0000
> > >    Uncompressing Kernel Image ... OK
> > >    Loading Device Tree to 007fa000, end 007ffd2f ... OK
> > >    Loading Ramdisk to 1ec58000, end 1efffc0c ... OK
> > > 
> > > Then it instantly resets.  If I remove CONFIG_WATCHDOG the board works and
> > > boots correctly.  My u-boot is circa early 2009.  From looking at the
> > > current u-boot it does not have the tcr and tsr registers "converted to
> > > uppercase", so I don't think it builds yet.  I've verified the addresses
> > > of the spr and they look correct.
> > 
> > Please check again. Here the current source:
> > 
> > arch/powerpc/cpu/ppc4xx/cpu.c:
> > 
> > ...
> > void reset_4xx_watchdog(void)
> > {
> > 	/*
> > 	 * Clear TSR(WIS) bit
> > 	 */
> > 	mtspr(SPRN_TSR, 0x40000000);
> > }
> > ...
> > 
> > Definitely upper-case here.
> 
> Ok, confirmed the new one has it in there.   sorry about that.  The logic
> is the same as the one that is in the old code though.

Well, ok, kind of.  cpu.c is correct, cpu_init.c that actually sets up the
watchdog timer is not though.  It still has the lower case register names.

#if defined(CONFIG_WATCHDOG)
        val = mfspr(tcr);
        ... 
	mtspr(tcr, val);

        val = mfspr(tsr);
        val |= 0x80000000;      /* enable watchdog timer */
        mtspr(tsr, val);
	...
#endif /* CONFIG_WATCHDOG */


I've added some prints and turned on debug and find that it makes it all
the way to the jump to the kernel.  So it must be an issue with the setup
or config of the kernel.  Does the device tree require any changes to work
with the watchdog?  Thanks for your help.

ame

  parent reply	other threads:[~2010-10-01 15:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-30 20:15 [U-Boot] ppc44x - watchdog timers reboots during the image loading ame
2010-09-30 20:48 ` Timur Tabi
2010-09-30 21:02   ` ame
2010-09-30 21:04     ` Timur Tabi
2010-10-01 13:35 ` Stefan Roese
2010-10-01 14:37   ` ame
2010-10-01 14:45     ` Stefan Roese
2010-10-01 15:36     ` ame [this message]
2010-10-04  8:49       ` Stefan Roese

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=20101001153639.GA28486@crust.elkhashab.com \
    --to=ayman@austin.rr.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox