diff options
author | Michael-Luke Jones <mlj28@cam.ac.uk> | 2007-05-23 17:38:45 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-05-26 05:09:39 -0400 |
commit | 435c5da00b9610f9664c5d6f38dfdafce419ef4a (patch) | |
tree | 1ed1653334c91ef355f2a89974c3dc19802bad36 /arch/arm/mach-ixp4xx/dsmg600-setup.c | |
parent | e87a8e85e90660183d3ef8e700627689c6292a3f (diff) |
[ARM] 4405/1: NSLU2, DSM-G600 frequency fixup code
This patch is required as the frequency fixup in nslu2_init does not
run sufficiently early in the boot sequence to take effect. In addition
the dsmg600 setup code behaviour has been improved such that a
'fixup' routine is avoided.
Signed-off-by: Michael-Luke Jones <mlj28@cam.ac.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ixp4xx/dsmg600-setup.c')
-rw-r--r-- | arch/arm/mach-ixp4xx/dsmg600-setup.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c index 1caff65e22cc..1e75e105c4f7 100644 --- a/arch/arm/mach-ixp4xx/dsmg600-setup.c +++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
19 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
20 | #include <asm/mach/flash.h> | 20 | #include <asm/mach/flash.h> |
21 | #include <asm/mach/time.h> | ||
21 | 22 | ||
22 | static struct flash_platform_data dsmg600_flash_data = { | 23 | static struct flash_platform_data dsmg600_flash_data = { |
23 | .map_name = "cfi_probe", | 24 | .map_name = "cfi_probe", |
@@ -128,6 +129,19 @@ static void dsmg600_power_off(void) | |||
128 | gpio_line_set(DSMG600_PO_GPIO, IXP4XX_GPIO_HIGH); | 129 | gpio_line_set(DSMG600_PO_GPIO, IXP4XX_GPIO_HIGH); |
129 | } | 130 | } |
130 | 131 | ||
132 | static void __init dsmg600_timer_init(void) | ||
133 | { | ||
134 | /* The xtal on this machine is non-standard. */ | ||
135 | ixp4xx_timer_freq = DSMG600_FREQ; | ||
136 | |||
137 | /* Call standard timer_init function. */ | ||
138 | ixp4xx_timer_init(); | ||
139 | } | ||
140 | |||
141 | static struct sys_timer dsmg600_timer = { | ||
142 | .init = dsmg600_timer_init, | ||
143 | }; | ||
144 | |||
131 | static void __init dsmg600_init(void) | 145 | static void __init dsmg600_init(void) |
132 | { | 146 | { |
133 | ixp4xx_sys_init(); | 147 | ixp4xx_sys_init(); |
@@ -155,21 +169,13 @@ static void __init dsmg600_init(void) | |||
155 | #endif | 169 | #endif |
156 | } | 170 | } |
157 | 171 | ||
158 | static void __init dsmg600_fixup(struct machine_desc *desc, | ||
159 | struct tag *tags, char **cmdline, struct meminfo *mi) | ||
160 | { | ||
161 | /* The xtal on this machine is non-standard. */ | ||
162 | ixp4xx_timer_freq = DSMG600_FREQ; | ||
163 | } | ||
164 | |||
165 | MACHINE_START(DSMG600, "D-Link DSM-G600 RevA") | 172 | MACHINE_START(DSMG600, "D-Link DSM-G600 RevA") |
166 | /* Maintainer: www.nslu2-linux.org */ | 173 | /* Maintainer: www.nslu2-linux.org */ |
167 | .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, | 174 | .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, |
168 | .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, | 175 | .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, |
169 | .boot_params = 0x00000100, | 176 | .boot_params = 0x00000100, |
170 | .fixup = dsmg600_fixup, | ||
171 | .map_io = ixp4xx_map_io, | 177 | .map_io = ixp4xx_map_io, |
172 | .init_irq = ixp4xx_init_irq, | 178 | .init_irq = ixp4xx_init_irq, |
173 | .timer = &ixp4xx_timer, | 179 | .timer = &dsmg600_timer, |
174 | .init_machine = dsmg600_init, | 180 | .init_machine = dsmg600_init, |
175 | MACHINE_END | 181 | MACHINE_END |