]> err.no Git - linux-2.6/blobdiff - arch/arm/mach-ixp4xx/nslu2-setup.c
Merge branch 'drm-patches' of ssh://master.kernel.org/pub/scm/linux/kernel/git/airlie...
[linux-2.6] / arch / arm / mach-ixp4xx / nslu2-setup.c
index 749a337494d3a710769dad39239e3140dcd43448..9bf8ccbcaccfd009baa0c07da854e38cbda96010 100644 (file)
@@ -22,6 +22,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
+#include <asm/mach/time.h>
 
 static struct flash_platform_data nslu2_flash_data = {
        .map_name               = "cfi_probe",
@@ -49,26 +50,26 @@ static struct ixp4xx_i2c_pins nslu2_i2c_gpio_pins = {
 static struct resource nslu2_led_resources[] = {
        {
                .name           = "ready",  /* green led */
-               .start          = NSLU2_LED_GRN,
-               .end            = NSLU2_LED_GRN,
+               .start          = NSLU2_LED_GRN_GPIO,
+               .end            = NSLU2_LED_GRN_GPIO,
                .flags          = IXP4XX_GPIO_HIGH,
        },
        {
                .name           = "status", /* red led */
-               .start          = NSLU2_LED_RED,
-               .end            = NSLU2_LED_RED,
+               .start          = NSLU2_LED_RED_GPIO,
+               .end            = NSLU2_LED_RED_GPIO,
                .flags          = IXP4XX_GPIO_HIGH,
        },
        {
                .name           = "disk-1",
-               .start          = NSLU2_LED_DISK1,
-               .end            = NSLU2_LED_DISK1,
+               .start          = NSLU2_LED_DISK1_GPIO,
+               .end            = NSLU2_LED_DISK1_GPIO,
                .flags          = IXP4XX_GPIO_LOW,
        },
        {
                .name           = "disk-2",
-               .start          = NSLU2_LED_DISK2,
-               .end            = NSLU2_LED_DISK2,
+               .start          = NSLU2_LED_DISK2_GPIO,
+               .end            = NSLU2_LED_DISK2_GPIO,
                .flags          = IXP4XX_GPIO_LOW,
        },
 };
@@ -157,6 +158,19 @@ static void nslu2_power_off(void)
        gpio_line_set(NSLU2_PO_GPIO, IXP4XX_GPIO_HIGH);
 }
 
+static void __init nslu2_timer_init(void)
+{
+    /* The xtal on this machine is non-standard. */
+    ixp4xx_timer_freq = NSLU2_FREQ;
+
+    /* Call standard timer_init function. */
+    ixp4xx_timer_init();
+}
+
+static struct sys_timer nslu2_timer = {
+    .init   = nslu2_timer_init,
+};
+
 static void __init nslu2_init(void)
 {
        ixp4xx_sys_init();
@@ -167,7 +181,8 @@ static void __init nslu2_init(void)
 
        pm_power_off = nslu2_power_off;
 
-       /* This is only useful on a modified machine, but it is valuable
+       /*
+        * This is only useful on a modified machine, but it is valuable
         * to have it first in order to see debug messages, and so that
         * it does *not* get removed if platform_add_devices fails!
         */
@@ -183,6 +198,6 @@ MACHINE_START(NSLU2, "Linksys NSLU2")
        .boot_params    = 0x00000100,
        .map_io         = ixp4xx_map_io,
        .init_irq       = ixp4xx_init_irq,
-       .timer          = &ixp4xx_timer,
+       .timer          = &nslu2_timer,
        .init_machine   = nslu2_init,
 MACHINE_END