linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: simon@sequanux.org (Simon Guinot)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] [ARM] Kirkwood: enhance TCLK detection
Date: Thu, 21 Oct 2010 11:42:28 +0200	[thread overview]
Message-ID: <1287654149-8743-1-git-send-email-simon@sequanux.org> (raw)
In-Reply-To: <20101020085720.GA12979@mail.wantstofly.org>

From: Simon Guinot <sguinot@lacie.com>

According to the Marvell LSP, the Sample at Reset regiter bit 21 can be
used to detect TCLK on 6281 and 6282 devices.

This patch has only been tested on LaCie boards.

Signed-off-by: Simon Guinot <sguinot@lacie.com>
---
 arch/arm/mach-kirkwood/common.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 1c82d42..ee99a5a 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -854,10 +854,9 @@ int __init kirkwood_find_tclk(void)
 
 	kirkwood_pcie_id(&dev, &rev);
 
-	if ((dev == MV88F6281_DEV_ID && (rev == MV88F6281_REV_A0 ||
-					rev == MV88F6281_REV_A1)) ||
-	    (dev == MV88F6282_DEV_ID))
-		return 200000000;
+	if (dev == MV88F6281_DEV_ID || dev == MV88F6282_DEV_ID)
+		if (((readl(SAMPLE_AT_RESET) >> 21) & 1) == 0)
+			return 200000000;
 
 	return 166666667;
 }
-- 
1.6.3.1

  parent reply	other threads:[~2010-10-21  9:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20  5:08 net{space,xbig} TCLK determination Lennert Buytenhek
2010-10-20  8:48 ` Simon Guinot
2010-10-20  8:57   ` Lennert Buytenhek
2010-10-21  7:45     ` [PATCH 1/2] [ARM] Kirkwood: enhance TLCK detection Simon Guinot
2010-10-21  7:45       ` [PATCH 2/2] [ARM] Kirkwood: fix timer initialization for LaCie boards Simon Guinot
2010-10-21  7:53         ` Lennert Buytenhek
2010-10-21  7:53       ` [PATCH 1/2] [ARM] Kirkwood: enhance TLCK detection Lennert Buytenhek
2010-10-21  8:11         ` Saeed Bishara
2010-10-21  9:58           ` Lennert Buytenhek
2010-10-21 11:03             ` Saeed Bishara
2010-10-21 14:10               ` Lennert Buytenhek
2010-10-21  7:56       ` Saeed Bishara
2010-10-21  9:49         ` Simon Guinot
2010-10-21  9:42     ` Simon Guinot [this message]
2010-10-21  9:42       ` [PATCH v2 2/2] [ARM] Kirkwood: fix timer initialization for LaCie boards Simon Guinot
2010-10-21 13:54       ` [PATCH v2 1/2] [ARM] Kirkwood: enhance TCLK detection Simon Guinot
2010-10-21 14:11       ` Lennert Buytenhek

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=1287654149-8743-1-git-send-email-simon@sequanux.org \
    --to=simon@sequanux.org \
    --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).