MIPS: Fix build of non-CONFIG_SYSVIPC version of sys_32_ipc
[safe/jmp/linux-2.6] / arch / arm / mach-orion5x / mv2120-setup.c
index f1dcad3..97c9ccb 100644 (file)
@@ -22,7 +22,7 @@
 #include <asm/mach-types.h>
 #include <asm/gpio.h>
 #include <asm/mach/arch.h>
-#include <asm/arch/orion5x.h>
+#include <mach/orion5x.h>
 #include "common.h"
 #include "mpp.h"
 
@@ -39,7 +39,7 @@
  * Ethernet
  ****************************************************************************/
 static struct mv643xx_eth_platform_data mv2120_eth_data = {
-       .phy_addr       = 8,
+       .phy_addr       = MV643XX_ETH_PHY_ADDR(8),
 };
 
 static struct mv_sata_platform_data mv2120_sata_data = {
@@ -137,6 +137,50 @@ static struct i2c_board_info __initdata mv2120_i2c_rtc = {
        .irq    = 0,
 };
 
+static struct gpio_led mv2120_led_pins[] = {
+       {
+               .name                   = "mv2120:blue:health",
+               .gpio                   = 0,
+       },
+       {
+               .name                   = "mv2120:red:health",
+               .gpio                   = 1,
+       },
+       {
+               .name                   = "mv2120:led:bright",
+               .gpio                   = 4,
+               .default_trigger        = "default-on",
+       },
+       {
+               .name                   = "mv2120:led:dimmed",
+               .gpio                   = 5,
+       },
+       {
+               .name                   = "mv2120:red:sata0",
+               .gpio                   = 8,
+               .active_low             = 1,
+       },
+       {
+               .name                   = "mv2120:red:sata1",
+               .gpio                   = 9,
+               .active_low             = 1,
+       },
+
+};
+
+static struct gpio_led_platform_data mv2120_led_data = {
+       .leds           = mv2120_led_pins,
+       .num_leds       = ARRAY_SIZE(mv2120_led_pins),
+};
+
+static struct platform_device mv2120_leds = {
+       .name   = "leds-gpio",
+       .id     = -1,
+       .dev    = {
+               .platform_data  = &mv2120_led_data,
+       }
+};
+
 static void mv2120_power_off(void)
 {
        pr_info("%s: triggering power-off...\n", __func__);
@@ -159,6 +203,7 @@ static void __init mv2120_init(void)
        orion5x_i2c_init();
        orion5x_sata_init(&mv2120_sata_data);
        orion5x_uart0_init();
+       orion5x_xor_init();
 
        orion5x_setup_dev_boot_win(MV2120_NOR_BOOT_BASE, MV2120_NOR_BOOT_SIZE);
        platform_device_register(&mv2120_nor_flash);
@@ -172,6 +217,7 @@ static void __init mv2120_init(void)
                        gpio_free(MV2120_GPIO_RTC_IRQ);
        }
        i2c_register_board_info(0, &mv2120_i2c_rtc, 1);
+       platform_device_register(&mv2120_leds);
 
        /* register mv2120 specific power-off method */
        if (gpio_request(MV2120_GPIO_POWER_OFF, "POWEROFF") != 0 ||