linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Mike Nuss" <mikenuss@gmail.com>
To: "Kumar Gala" <galak@kernel.crashing.org>
Cc: PowerPC dev list <linuxppc-dev@ozlabs.org>
Subject: Re: Book-E watchdog driver questions
Date: Thu, 3 Jan 2008 09:46:56 -0500	[thread overview]
Message-ID: <a340dd0e0801030646x4609c669sed653f812d7865e4@mail.gmail.com> (raw)
In-Reply-To: <a340dd0e0709251118n108799adxb60af2afa6ac9a96@mail.gmail.com>

On Sep 25, 2007 1:18 PM, Mike Nuss <mikenuss@gmail.com> wrote:
> > > Is there a reason that booke_wdt.c does not specify a MODULE_LICENSE?
> > >> From the copyright notice at the top it appears to be GPL. As
> > >> written,
> > > it taints the kernel.
> >
> > Odd, no reason.  I'll submit a patch for that.
> >
> > > Also, if I test out the driver by killing my process that's doing the
> > > pinging, I get a kernel panic:
> >
> > Its been a while since i've tried this.  I'll try it out and see what
> > happens.

The kernel panic was caused because TCR: WIE was set. This bit should
not be set, because it causes the timer to generate an interrupt that
the kernel does not handle.

>
> I also found that GETBOOTSTATUS returns 0 after the reboot. Looking at
> the source code I found the comment "XXX: something is clearing TSR" -
> I take that to mean that the register is being cleared by something
> before the module tries to read it? In my case U-Boot may be clearing
> that - I can take a look.

It turns out that the status bits in TSR are undefined at poweron
reset. Boards require external logic to detect POR - this is described
in AMCC's app note for the WDT. Because of this, U-Boot clears TSR
early on in the standard 4xx firmware (in start.S). To use TSR to
detect a watchdog reset, U-Boot must be modified to check that logic
and only clear the bits at POR. Those bits will be preserved until the
kernel driver looks at them, or until the system is powered off. So
the driver is correct here, but the comment should be updated to
explain why the GETBOOTSTATUS value may not be meaningful - it
requires additional hardware and firmware support.

I can submit a patch for these issues if you like.

Mike

  reply	other threads:[~2008-01-03 14:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <46F93E54.5050203@gmail.com>
2007-09-25 17:42 ` Book-E watchdog driver questions Kumar Gala
2007-09-25 18:18   ` Mike Nuss
2008-01-03 14:46     ` Mike Nuss [this message]
2007-09-25 16:59 Mike Nuss

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=a340dd0e0801030646x4609c669sed653f812d7865e4@mail.gmail.com \
    --to=mikenuss@gmail.com \
    --cc=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.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).