linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: nbowler@elliptictech.com (Nick Bowler)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ARM: vexpress: Add clock definition for the SP805.
Date: Fri, 15 Jul 2011 11:04:00 -0400	[thread overview]
Message-ID: <1310742242-14647-2-git-send-email-nbowler@elliptictech.com> (raw)
In-Reply-To: <1310742242-14647-1-git-send-email-nbowler@elliptictech.com>

It seems that an entry for the SP805 watchdog in the table of clocks was
missing.  This results in the sp805_wdt driver rejecting the device with
the following errors:

  sp805-wdt mb:wdt: Clock not found
  sp805-wdt mb:wdt: Probe Failed!!!
  sp805-wdt: probe of mb:wdt failed with error -2

While not obviously stated in the hardware docs, the onboard SP810's
"REFCLK" is connected to a 32.768KHz crystal, and this drives the
watchdog.  Add a struct clk and corresponding lookup entry for it.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
 arch/arm/mach-vexpress/v2m.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 9e6b93b..d0d267a 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -318,6 +318,10 @@ static struct clk v2m_sp804_clk = {
 	.rate	= 1000000,
 };
 
+static struct clk v2m_ref_clk = {
+	.rate   = 32768,
+};
+
 static struct clk dummy_apb_pclk;
 
 static struct clk_lookup v2m_lookups[] = {
@@ -348,6 +352,9 @@ static struct clk_lookup v2m_lookups[] = {
 	}, {	/* CLCD */
 		.dev_id		= "mb:clcd",
 		.clk		= &osc1_clk,
+	}, {	/* SP805 WDT */
+		.dev_id		= "mb:wdt",
+		.clk		= &v2m_ref_clk,
 	}, {	/* SP804 timers */
 		.dev_id		= "sp804",
 		.con_id		= "v2m-timer0",
-- 
1.7.3.4

  reply	other threads:[~2011-07-15 15:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-15 15:03 [PATCH 0/3] SP805 updates for Versatile Express Nick Bowler
2011-07-15 15:04 ` Nick Bowler [this message]
2011-07-15 15:04 ` [PATCH 2/3] watchdog: sp805: Don't write 0 to the load value register Nick Bowler
2011-07-15 15:04 ` [PATCH 3/3] watchdog: sp805: Flush posted writes in enable/disable Nick Bowler
2011-07-15 20:59 ` [PATCH 0/3] SP805 updates for Versatile Express Wim Van Sebroeck
2011-07-18  9:44   ` Russell King - ARM Linux
2011-07-19 13:15     ` Nick Bowler
2011-07-22 18:31       ` Wim Van Sebroeck
2011-07-22 19:01         ` Nick Bowler

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=1310742242-14647-2-git-send-email-nbowler@elliptictech.com \
    --to=nbowler@elliptictech.com \
    --cc=linux-arm-kernel@lists.infradead.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).