From: "Albrecht Dreß" <albrecht.dress@arcor.de>
To: Linux PPC Development <linuxppc-dev@ozlabs.org>
Cc: wim@iguana.be
Subject: [PATCH] powerpc/mpc52xx/wdt: Fix 5200 wdt always being used as gpt
Date: Mon, 03 Aug 2009 18:40:46 +0200 [thread overview]
Message-ID: <1249317654.3404.0@antares> (raw)
[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]
In the current code, all MPC5200 timers are registered by the
mpc52xx_gpt driver, even if gpt0 (the only one with this capability)
shall be used as hardware watchdog which is indicated by the
"fsl,has-wdt" or "has-wdt" property in the device tree. Thus, the
watchdog driver does never find any watchdog and simply doesn't work.
This trivial patch protects timers with a "(fsl,)?has-wdt" property
from being probed as gpt's. The watchdog timer now works just fine.
Tested on a custom (roughly Icecube based) MPC5200B board, with the
5200 watchdog driver built into the kernel.
Signed-off-by: Albrecht Dreß <albrecht.dress@arcor.de>
---
--- linux-2.6.30.3.orig/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
2009-07-24 23:47:51.000000000 +0200
+++ linux-2.6.30.3/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
2009-08-03 14:20:10.000000000 +0200
@@ -343,6 +343,14 @@
{
struct mpc52xx_gpt_priv *gpt;
+ /* do not grab devices which shall be used as watchdog */
+ if (of_get_property(ofdev->node, "fsl,has-wdt", NULL) ||
+ of_get_property(ofdev->node, "has-wdt", NULL)) {
+ pr_notice("%s: ignore wdt %s\n", __func__,
+ ofdev->node->full_name);
+ return -ENODEV;
+ }
+
gpt = kzalloc(sizeof *gpt, GFP_KERNEL);
if (!gpt)
return -ENOMEM;
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2009-08-03 16:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-03 16:40 Albrecht Dreß [this message]
2009-08-03 17:50 ` [PATCH] powerpc/mpc52xx/wdt: Fix 5200 wdt always being used as gpt Grant Likely
2009-08-03 18:46 ` Albrecht Dreß
2009-08-05 4:47 ` Grant Likely
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=1249317654.3404.0@antares \
--to=albrecht.dress@arcor.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=wim@iguana.be \
/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.