This fixes the problem with the tick count on NSLU2 boards by correcting
authorJohn Bowler <jbowler@nslu2-linux.org>
Sat, 6 Aug 2005 03:00:13 +0000 (03:00 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sat, 6 Aug 2005 03:00:13 +0000 (03:00 +0000)
the CLOCKS_PER_TICK in the kernel.  It also (necessarily) removes the
TICKADJ setting in the sysvinit nslu2 rcS-default.  It adds a commented
out TICKADJ to rcS-default - because that is supported now by the ntp
4.2.0 startup (ntpd) script in OE.

packages/linux/nslu2-kernel/2.6/timer.patch [new file with mode: 0644]
packages/linux/nslu2-kernel_2.6.12.2.bb
packages/linux/nslu2-kernel_2.6.12.bb
packages/sysvinit/sysvinit/nslu2/rcS-default
packages/sysvinit/sysvinit/rcS-default
packages/sysvinit/sysvinit_2.86.bb

diff --git a/packages/linux/nslu2-kernel/2.6/timer.patch b/packages/linux/nslu2-kernel/2.6/timer.patch
new file mode 100644 (file)
index 0000000..6279746
--- /dev/null
@@ -0,0 +1,24 @@
+# Fix for the NSLU2 timer problem (tickadj 10101.01 when it should be 10000)
+# Also contains a fix for the more generate problem on the ixp4xx in that the
+# Intel spec says to use a 33.33MHz crystal, not 33.333333Mhz
+
+--- linux-2.6.12.2/include/asm-arm/arch-ixp4xx/timex.h.orig    2005-08-05 11:02:09.872690723 -0700
++++ linux-2.6.12.2/include/asm-arm/arch-ixp4xx/timex.h 2005-08-05 11:45:08.786971567 -0700
+@@ -7,7 +7,14 @@
+ /*
+  * We use IXP425 General purpose timer for our timer needs, it runs at 
+- * 66.66... MHz
++ * 66.66 MHz (exactly) by the Intel specification.
+  */
+-#define CLOCK_TICK_RATE (66666666)
+-
++#if 0
++#define CLOCK_TICK_RATE (66660000)
++#else
++/*
++ * Unfortunately the NSLU2 has a 33MHz crystal, so the rate is not the
++ * specified one.
++ */
++#define CLOCK_TICK_RATE (66000000)
++#endif
index 8b54cdc..64b5788 100644 (file)
@@ -1,5 +1,5 @@
 # Kernel for NSLU2
-PR = "r6"
+PR = "r7"
 include nslu2-kernel.inc
 
 # N2K_EXTRA_PATCHES - list of patches to apply (can include
@@ -22,4 +22,5 @@ N2K_PATCHES = "\
        file://x1205-rtc.c-id.patch;patch=1 \
        file://mtd-shutdown.patch;patch=1 \
        file://missing-exports.patch;patch=1 \
+       file://timer.patch;patch=1 \
 "
index 6cea8a4..a8fa808 100644 (file)
@@ -1,5 +1,5 @@
 # Kernel for NSLU2
-PR = "r2"
+PR = "r3"
 include nslu2-kernel.inc
 
 # N2K_EXTRA_PATCHES - list of patches to apply (can include
@@ -21,4 +21,5 @@ N2K_PATCHES = "\
        file://xscale-reset.patch;patch=1 \
        file://x1205-rtc.c-id.patch;patch=1 \
        file://mtd-shutdown.patch;patch=1 \
+       file://timer.patch;patch=1 \
 "
index 7c34294..d53be76 100644 (file)
@@ -19,5 +19,4 @@ EDITMOTD=no
 # Set FSCKFIX to "yes" if you want to add "-y" to the fsck at startup.
 FSCKFIX=yes
 # Set TICKADJ to the correct tick value for this specific machine
-#NSLU2: determined by experiment to be 100/99*10000 usec/tick
-TICKADJ=10101
+#TICKADJ=10000
index fb22117..46e48b9 100644 (file)
@@ -17,3 +17,5 @@ VERBOSE=no
 EDITMOTD=no
 # Set FSCKFIX to "yes" if you want to add "-y" to the fsck at startup.
 FSCKFIX=yes
+# Set TICKADJ to the correct tick value for this specific machine
+#TICKADJ=10000
index 73813d2..e59102d 100644 (file)
@@ -3,7 +3,7 @@ SECTION = "base"
 LICENSE = "GPL"
 MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
 HOMEPAGE = "http://freshmeat.net/projects/sysvinit/"
-PR = "r17"
+PR = "r18"
 
 # USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf.
 # Set PACKAGE_ARCH appropriately.