public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux@fluff.org>
To: wim@iguana.be
Cc: linux-kernel@vger.kernel.org, Ben Dooks <ben-linux@fluff.org>
Subject: [patch 1/2] WATCHDOG: s3c2410_wdt announce initialisation
Date: Thu, 14 Jun 2007 12:08:54 +0100	[thread overview]
Message-ID: <20070614110910.426654398@fluff.org.uk> (raw)
In-Reply-To: 20070614110853.539162819@fluff.org.uk

[-- Attachment #1: simtec-drivers-watchdog-announce.patch --]
[-- Type: text/plain, Size: 1273 bytes --]

Announce the watchdog once the initialisation is
complete. This aides debugging problems where the
watchdog driver has been loaded and shows the
current state for the user.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>

Index: linux-2.6.21-quilt2/drivers/char/watchdog/s3c2410_wdt.c
===================================================================
--- linux-2.6.21-quilt2.orig/drivers/char/watchdog/s3c2410_wdt.c	2007-05-10 13:43:52.000000000 +0100
+++ linux-2.6.21-quilt2/drivers/char/watchdog/s3c2410_wdt.c	2007-05-11 11:55:46.000000000 +0100
@@ -348,6 +348,7 @@ static irqreturn_t s3c2410wdt_irq(int ir
 static int s3c2410wdt_probe(struct platform_device *pdev)
 {
 	struct resource *res;
+	unsigned int wtcon;
 	int started = 0;
 	int ret;
 	int size;
@@ -433,6 +434,16 @@ static int s3c2410wdt_probe(struct platf
 		s3c2410wdt_stop();
 	}
 
+	/* print out a statement of readiness */
+
+	wtcon = readl(wdt_base + S3C2410_WTCON);
+
+	dev_info(&pdev->dev,
+		 "watchdog %sactive, reset %sabled, irq %sabled\n", 
+		 (wtcon & S3C2410_WTCON_ENABLE) ?  "" : "in",
+		 (wtcon & S3C2410_WTCON_RSTEN) ? "" : "dis",
+		 (wtcon & S3C2410_WTCON_INTEN) ? "" : "en");
+
 	return 0;
 
  err_clk:

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

  reply	other threads:[~2007-06-14 11:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14 11:08 [patch 0/2] S3C24XX watchdog updates Ben Dooks
2007-06-14 11:08 ` Ben Dooks [this message]
2007-06-14 11:08 ` [patch 2/2] WATCHDOG: change s3c2410_wdt to using dev_() macros for output Ben Dooks

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=20070614110910.426654398@fluff.org.uk \
    --to=ben-linux@fluff.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox