1 This patch is required as the frequency fixup in nslu2_init does not
2 run sufficiently early in the boot sequence to take effect. In
3 addition the dsmg600 setup code behaviour has been improved such
4 that a 'fixup' routine is avoided.
6 Signed-off-by: Michael-Luke Jones <mlj28@cam.ac.uk>
8 Index: linux-2.6.21-arm/arch/arm/mach-ixp4xx/nslu2-setup.c
9 ===================================================================
10 --- linux-2.6.21-arm.orig/arch/arm/mach-ixp4xx/nslu2-setup.c 2007-05-07 12:05:40.000000000 -0700
11 +++ linux-2.6.21-arm/arch/arm/mach-ixp4xx/nslu2-setup.c 2007-05-07 12:15:56.000000000 -0700
13 #include <asm/mach-types.h>
14 #include <asm/mach/arch.h>
15 #include <asm/mach/flash.h>
16 +#include <asm/mach/time.h>
18 static struct flash_platform_data nslu2_flash_data = {
19 .map_name = "cfi_probe",
21 gpio_line_set(NSLU2_PO_GPIO, IXP4XX_GPIO_HIGH);
24 -static void __init nslu2_init(void)
25 +static void __init nslu2_timer_init(void)
27 - ixp4xx_timer_freq = NSLU2_FREQ;
28 + /* The xtal on this machine is non-standard. */
29 + ixp4xx_timer_freq = NSLU2_FREQ;
31 + /* Call standard timer_init function. */
32 + ixp4xx_timer_init();
35 +static struct sys_timer nslu2_timer = {
36 + .init = nslu2_timer_init,
39 +static void __init nslu2_init(void)
43 nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
45 .boot_params = 0x00000100,
46 .map_io = ixp4xx_map_io,
47 .init_irq = ixp4xx_init_irq,
48 - .timer = &ixp4xx_timer,
49 + .timer = &nslu2_timer,
50 .init_machine = nslu2_init,
52 Index: linux-2.6.21-arm/arch/arm/mach-ixp4xx/common.c
53 ===================================================================
54 --- linux-2.6.21-arm.orig/arch/arm/mach-ixp4xx/common.c 2007-05-07 12:05:40.000000000 -0700
55 +++ linux-2.6.21-arm/arch/arm/mach-ixp4xx/common.c 2007-05-07 12:15:16.000000000 -0700
57 .handler = ixp4xx_timer_interrupt,
60 -static void __init ixp4xx_timer_init(void)
61 +void __init ixp4xx_timer_init(void)
63 /* Clear Pending Interrupt by writing '1' to it */
64 *IXP4XX_OSST = IXP4XX_OSST_TIMER_1_PEND;
65 Index: linux-2.6.21-arm/include/asm-arm/arch-ixp4xx/platform.h
66 ===================================================================
67 --- linux-2.6.21-arm.orig/include/asm-arm/arch-ixp4xx/platform.h 2007-05-07 12:05:40.000000000 -0700
68 +++ linux-2.6.21-arm/include/asm-arm/arch-ixp4xx/platform.h 2007-05-07 12:15:16.000000000 -0700
70 extern void ixp4xx_map_io(void);
71 extern void ixp4xx_init_irq(void);
72 extern void ixp4xx_sys_init(void);
73 +extern void ixp4xx_timer_init(void);
74 extern struct sys_timer ixp4xx_timer;
75 extern void ixp4xx_pci_preinit(void);
77 Index: linux-2.6.21-arm/arch/arm/mach-ixp4xx/dsmg600-setup.c
78 ===================================================================
79 --- linux-2.6.21-arm.orig/arch/arm/mach-ixp4xx/dsmg600-setup.c 2007-05-07 12:05:42.000000000 -0700
80 +++ linux-2.6.21-arm/arch/arm/mach-ixp4xx/dsmg600-setup.c 2007-05-07 12:16:07.000000000 -0700
82 #include <asm/mach-types.h>
83 #include <asm/mach/arch.h>
84 #include <asm/mach/flash.h>
85 +#include <asm/mach/time.h>
87 static struct flash_platform_data dsmg600_flash_data = {
88 .map_name = "cfi_probe",
90 gpio_line_set(DSMG600_PO_GPIO, IXP4XX_GPIO_HIGH);
93 +static void __init dsmg600_timer_init(void)
95 + /* The xtal on this machine is non-standard. */
96 + ixp4xx_timer_freq = DSMG600_FREQ;
98 + /* Call standard timer_init function. */
99 + ixp4xx_timer_init();
102 +static struct sys_timer dsmg600_timer = {
103 + .init = dsmg600_timer_init,
106 static void __init dsmg600_init(void)
109 @@ -155,21 +169,13 @@
113 -static void __init dsmg600_fixup(struct machine_desc *desc,
114 - struct tag *tags, char **cmdline, struct meminfo *mi)
116 - /* The xtal on this machine is non-standard. */
117 - ixp4xx_timer_freq = DSMG600_FREQ;
120 MACHINE_START(DSMG600, "D-Link DSM-G600 RevA")
121 /* Maintainer: www.nslu2-linux.org */
122 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
123 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC,
124 .boot_params = 0x00000100,
125 - .fixup = dsmg600_fixup,
126 .map_io = ixp4xx_map_io,
127 .init_irq = ixp4xx_init_irq,
128 - .timer = &ixp4xx_timer,
129 + .timer = &dsmg600_timer,
130 .init_machine = dsmg600_init,