mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Bowler <jbowler@acm.org>
To: "'Deepak Saxena'" <dsaxena@plexity.net>
Cc: <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.arm.linux.org.uk>
Subject: [PATCH] 2.6.14 include/asm-arm/arch-ixp4xx/timex.h: fix clock frequency on NSLU2
Date: Thu, 27 Oct 2005 23:32:25 -0700	[thread overview]
Message-ID: <001101c5db89$5d5b1560$1001a8c0@kalmiopsis> (raw)

The basis for this patch has been discussed on l-a-k on a thread
with subject line "IXP4xx timer interupt bug" then later on 
nslu2-developers@nslu2-linux.org on a thread "ixp4xx variable
timer base issue".

The problem is that the NSLU2 deviates from the Intel IXDP425
system by using a cystal with frequency 66MHz as opposed to the
Intel stated (not quite mandated) value of 66.666666MHz.  This
results in serious errors in the RTC (1%).

The patch configs in the correct value for the NSLU2.  The problem
with the patch is that a multi-config kernel which includes NSLU2
support will use the NSLU2 frequency.  However such kernels are
not a requirement as generic kernels are never flashed into NSLU2
systems (so there is no need to build NSLU2 support into a generic
kernel).

Signed-off-by: John Bowler <jbowler@acm.org>

--- linux-2.6.13.1/include/asm-arm/arch-ixp4xx/timex.h	2005-09-17 12:42:45.000000000 +0200
+++ nslu2-2.6.13.1/include/asm-arm/arch-ixp4xx/timex.h	2005-09-17 12:15:31.000000000 +0200
@@ -9,7 +9,12 @@
  * We use IXP425 General purpose timer for our timer needs, it runs at 
  * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
  * timer register ignores the bottom 2 bits of the LATCH value.
+ * The NSLU2 has a 33.00MHz crystal, so a different FREQ is required.
  */
+#ifdef CONFIG_MACH_NSLU2
+#define FREQ 66000000
+#else
 #define FREQ 66666666
+#endif
 #define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
 


             reply	other threads:[~2005-10-28  7:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-28  6:32 John Bowler [this message]
2005-10-28  8:32 ` 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='001101c5db89$5d5b1560$1001a8c0@kalmiopsis' \
    --to=jbowler@acm.org \
    --cc=dsaxena@plexity.net \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®