sh: Add romImage support for EcoVec24
[pandora-kernel.git] / arch / sh / boards / mach-ecovec24 / setup.c
index 428d118..b44c060 100644 (file)
@@ -324,6 +324,13 @@ static struct platform_device ceu1_device = {
        },
 };
 
+/* I2C device */
+static struct i2c_board_info i2c1_devices[] = {
+       {
+               I2C_BOARD_INFO("r2025sd", 0x32),
+       },
+};
+
 static struct platform_device *ecovec_devices[] __initdata = {
        &heartbeat_device,
        &nor_flash_device,
@@ -371,6 +378,7 @@ static int __init devices_setup(void)
        gpio_request(GPIO_FN_LNKSTA,       NULL);
 
        /* enable USB */
+       ctrl_outw(0x0000, 0xA4D80000);
        gpio_request(GPIO_PTB3,  NULL);
        gpio_request(GPIO_PTB4,  NULL);
        gpio_request(GPIO_PTB5,  NULL);
@@ -506,10 +514,14 @@ static int __init devices_setup(void)
        gpio_request(GPIO_FN_VIO1_CLK, NULL);
        platform_resource_setup_memory(&ceu1_device, "ceu1", 4 << 20);
 
+       /* enable I2C device */
+       i2c_register_board_info(1, i2c1_devices,
+                               ARRAY_SIZE(i2c1_devices));
+
        return platform_add_devices(ecovec_devices,
                                    ARRAY_SIZE(ecovec_devices));
 }
-device_initcall(devices_setup);
+arch_initcall(devices_setup);
 
 static struct sh_machine_vector mv_ecovec __initmv = {
        .mv_name        = "R0P7724 (EcoVec)",