Submitted as http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2006-June/034635.html This is the NSLU2-specific part of the two-part series which enables the Linksys NSLU2 (which has a 66.0000MHz crystal frequency instead of the standard 66.6666MHz for other IXP4xx boards) to keep somewhat accurate time. This patch uses the ixp4xx_set_board_tick_rate API which was provided by the previous patch in this two-part series (and therefore depends on that first part being already applied). Signed-off-by: John Bowler Signed-off-by: Rod Whitby PATCH FOLLOWS KernelVersion: 2.6.17 arch/arm/mach-ixp4xx/nslu2-setup.c | 5 +++++ include/asm-arm/arch-ixp4xx/nslu2.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) Index: linux-2.6.17/arch/arm/mach-ixp4xx/nslu2-setup.c =================================================================== --- linux-2.6.17.orig/arch/arm/mach-ixp4xx/nslu2-setup.c +++ linux-2.6.17/arch/arm/mach-ixp4xx/nslu2-setup.c @@ -215,6 +215,11 @@ static void __init nslu2_init(void) { + /* The NSLU2 has a 66MHz crystal on board - 1.01% different + * from the typical value. + */ + ixp4xx_set_board_tick_rate(66000000); + /* The flash has an ethernet MAC embedded in it which we need, * that is all this notifier does. */ Index: linux-2.6.17/include/asm-arm/arch-ixp4xx/nslu2.h =================================================================== --- linux-2.6.17.orig/include/asm-arm/arch-ixp4xx/nslu2.h +++ linux-2.6.17/include/asm-arm/arch-ixp4xx/nslu2.h @@ -35,11 +35,6 @@ #define NSLU2_PCI_INTD_PIN 8 -/* NSLU2 Timer */ -#define NSLU2_FREQ 66000000 -#define NSLU2_CLOCK_TICK_RATE (((NSLU2_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) -#define NSLU2_CLOCK_TICKS_PER_USEC ((NSLU2_CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC) - /* GPIO */ #define NSLU2_GPIO0 0