aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/nslu2-setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ixp4xx/nslu2-setup.c')
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-setup.c37
1 files changed, 25 insertions, 12 deletions
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
index 162c266e5f8f..9bf8ccbcaccf 100644
--- a/arch/arm/mach-ixp4xx/nslu2-setup.c
+++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
@@ -22,6 +22,7 @@
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <asm/mach/flash.h> 24#include <asm/mach/flash.h>
25#include <asm/mach/time.h>
25 26
26static struct flash_platform_data nslu2_flash_data = { 27static struct flash_platform_data nslu2_flash_data = {
27 .map_name = "cfi_probe", 28 .map_name = "cfi_probe",
@@ -49,26 +50,26 @@ static struct ixp4xx_i2c_pins nslu2_i2c_gpio_pins = {
49static struct resource nslu2_led_resources[] = { 50static struct resource nslu2_led_resources[] = {
50 { 51 {
51 .name = "ready", /* green led */ 52 .name = "ready", /* green led */
52 .start = NSLU2_LED_GRN, 53 .start = NSLU2_LED_GRN_GPIO,
53 .end = NSLU2_LED_GRN, 54 .end = NSLU2_LED_GRN_GPIO,
54 .flags = IXP4XX_GPIO_HIGH, 55 .flags = IXP4XX_GPIO_HIGH,
55 }, 56 },
56 { 57 {
57 .name = "status", /* red led */ 58 .name = "status", /* red led */
58 .start = NSLU2_LED_RED, 59 .start = NSLU2_LED_RED_GPIO,
59 .end = NSLU2_LED_RED, 60 .end = NSLU2_LED_RED_GPIO,
60 .flags = IXP4XX_GPIO_HIGH, 61 .flags = IXP4XX_GPIO_HIGH,
61 }, 62 },
62 { 63 {
63 .name = "disk-1", 64 .name = "disk-1",
64 .start = NSLU2_LED_DISK1, 65 .start = NSLU2_LED_DISK1_GPIO,
65 .end = NSLU2_LED_DISK1, 66 .end = NSLU2_LED_DISK1_GPIO,
66 .flags = IXP4XX_GPIO_LOW, 67 .flags = IXP4XX_GPIO_LOW,
67 }, 68 },
68 { 69 {
69 .name = "disk-2", 70 .name = "disk-2",
70 .start = NSLU2_LED_DISK2, 71 .start = NSLU2_LED_DISK2_GPIO,
71 .end = NSLU2_LED_DISK2, 72 .end = NSLU2_LED_DISK2_GPIO,
72 .flags = IXP4XX_GPIO_LOW, 73 .flags = IXP4XX_GPIO_LOW,
73 }, 74 },
74}; 75};
@@ -157,10 +158,21 @@ static void nslu2_power_off(void)
157 gpio_line_set(NSLU2_PO_GPIO, IXP4XX_GPIO_HIGH); 158 gpio_line_set(NSLU2_PO_GPIO, IXP4XX_GPIO_HIGH);
158} 159}
159 160
160static void __init nslu2_init(void) 161static void __init nslu2_timer_init(void)
161{ 162{
162 ixp4xx_timer_freq = NSLU2_FREQ; 163 /* The xtal on this machine is non-standard. */
164 ixp4xx_timer_freq = NSLU2_FREQ;
165
166 /* Call standard timer_init function. */
167 ixp4xx_timer_init();
168}
163 169
170static struct sys_timer nslu2_timer = {
171 .init = nslu2_timer_init,
172};
173
174static void __init nslu2_init(void)
175{
164 ixp4xx_sys_init(); 176 ixp4xx_sys_init();
165 177
166 nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); 178 nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
@@ -169,7 +181,8 @@ static void __init nslu2_init(void)
169 181
170 pm_power_off = nslu2_power_off; 182 pm_power_off = nslu2_power_off;
171 183
172 /* This is only useful on a modified machine, but it is valuable 184 /*
185 * This is only useful on a modified machine, but it is valuable
173 * to have it first in order to see debug messages, and so that 186 * to have it first in order to see debug messages, and so that
174 * it does *not* get removed if platform_add_devices fails! 187 * it does *not* get removed if platform_add_devices fails!
175 */ 188 */
@@ -185,6 +198,6 @@ MACHINE_START(NSLU2, "Linksys NSLU2")
185 .boot_params = 0x00000100, 198 .boot_params = 0x00000100,
186 .map_io = ixp4xx_map_io, 199 .map_io = ixp4xx_map_io,
187 .init_irq = ixp4xx_init_irq, 200 .init_irq = ixp4xx_init_irq,
188 .timer = &ixp4xx_timer, 201 .timer = &nslu2_timer,
189 .init_machine = nslu2_init, 202 .init_machine = nslu2_init,
190MACHINE_END 203MACHINE_END