Merge branch 'sh/stable-updates'
[safe/jmp/linux-2.6] / arch / sh / boards / mach-ecovec24 / setup.c
index 6a8861b..a49cce1 100644 (file)
 
 /* Heartbeat */
 static unsigned char led_pos[] = { 0, 1, 2, 3 };
+
 static struct heartbeat_data heartbeat_data = {
-       .regsize = 8,
        .nr_bits = 4,
        .bit_pos = led_pos,
 };
 
-static struct resource heartbeat_resources[] = {
-       [0] = {
-               .start  = 0xA405012C, /* PTG */
-               .end    = 0xA405012E - 1,
-               .flags  = IORESOURCE_MEM,
-       },
+static struct resource heartbeat_resource = {
+       .start  = 0xA405012C, /* PTG */
+       .end    = 0xA405012E - 1,
+       .flags  = IORESOURCE_MEM | IORESOURCE_MEM_8BIT,
 };
 
 static struct platform_device heartbeat_device = {
@@ -84,8 +82,8 @@ static struct platform_device heartbeat_device = {
        .dev = {
                .platform_data = &heartbeat_data,
        },
-       .num_resources  = ARRAY_SIZE(heartbeat_resources),
-       .resource       = heartbeat_resources,
+       .num_resources  = 1,
+       .resource       = &heartbeat_resource,
 };
 
 /* MTD */
@@ -353,6 +351,10 @@ static struct i2c_board_info i2c1_devices[] = {
        {
                I2C_BOARD_INFO("r2025sd", 0x32),
        },
+       {
+               I2C_BOARD_INFO("lis3lv02d", 0x1c),
+               .irq = 33,
+       }
 };
 
 /* KEYSC */
@@ -1115,6 +1117,10 @@ static int __init arch_setup(void)
        gpio_direction_output(GPIO_PTU0, 0);
        mdelay(20);
 
+       /* enable motion sensor */
+       gpio_request(GPIO_FN_INTC_IRQ1, NULL);
+       gpio_direction_input(GPIO_FN_INTC_IRQ1);
+
        /* enable I2C device */
        i2c_register_board_info(0, i2c0_devices,
                                ARRAY_SIZE(i2c0_devices));