static struct i2c_board_info __initdata i2c0_info[] = {
};
#endif
+
#ifdef CONFIG_I2C1_RK30
static struct i2c_board_info __initdata i2c1_info[] = {
};
#endif
+
#ifdef CONFIG_I2C2_RK30
static struct i2c_board_info __initdata i2c2_info[] = {
};
#endif
+
#ifdef CONFIG_I2C3_RK30
static struct i2c_board_info __initdata i2c3_info[] = {
};
#endif
+
#ifdef CONFIG_I2C4_RK30
static struct i2c_board_info __initdata i2c4_info[] = {
};
#endif
+
static void __init rk30_i2c_register_board_info(void)
{
#ifdef CONFIG_I2C0_RK30
- i2c_register_board_info(0, i2c0_info, ARRAY_SIZE(i2c0_info));
+ i2c_register_board_info(0, i2c0_info, ARRAY_SIZE(i2c0_info));
#endif
#ifdef CONFIG_I2C1_RK30
- i2c_register_board_info(1, i2c1_info, ARRAY_SIZE(i2c1_info));
+ i2c_register_board_info(1, i2c1_info, ARRAY_SIZE(i2c1_info));
#endif
#ifdef CONFIG_I2C2_RK30
- i2c_register_board_info(2, i2c2_info, ARRAY_SIZE(i2c2_info));
+ i2c_register_board_info(2, i2c2_info, ARRAY_SIZE(i2c2_info));
#endif
#ifdef CONFIG_I2C3_RK30
- i2c_register_board_info(3, i2c3_info, ARRAY_SIZE(i2c3_info));
+ i2c_register_board_info(3, i2c3_info, ARRAY_SIZE(i2c3_info));
#endif
#ifdef CONFIG_I2C4_RK30
- i2c_register_board_info(4, i2c4_info, ARRAY_SIZE(i2c4_info));
+ i2c_register_board_info(4, i2c4_info, ARRAY_SIZE(i2c4_info));
#endif
}
//end of i2c
static void __init machine_rk30_board_init(void)
{
- rk30_i2c_register_board_info();
- platform_add_devices(devices, ARRAY_SIZE(devices));
+ rk30_i2c_register_board_info();
+ platform_add_devices(devices, ARRAY_SIZE(devices));
}
static void __init rk30_reserve(void)
// i2c
#ifdef CONFIG_I2C0_RK30
static struct rk30_i2c_platform_data default_i2c0_data = {
- .bus_num = 0,
- .is_div_from_arm = 1,
- #ifdef CONFIG_I2C0_CONTROLLER_RK29
- .adap_type = I2C_RK29_ADAP,
- #endif
- #ifdef CONFIG_I2C0_CONTROLLER_RK30
- .adap_type = I2C_RK30_ADAP,
- #endif
+ .bus_num = 0,
+ .is_div_from_arm = 1,
+#ifdef CONFIG_I2C0_CONTROLLER_RK29
+ .adap_type = I2C_RK29_ADAP,
+#endif
+#ifdef CONFIG_I2C0_CONTROLLER_RK30
+ .adap_type = I2C_RK30_ADAP,
+#endif
};
+
static struct resource resources_i2c0[] = {
{
.start = IRQ_I2C0,
.id = 0,
.num_resources = ARRAY_SIZE(resources_i2c0),
.resource = resources_i2c0,
- .dev = {
+ .dev = {
.platform_data = &default_i2c0_data,
},
};
#endif
+
#ifdef CONFIG_I2C1_RK30
static struct rk30_i2c_platform_data default_i2c1_data = {
- .bus_num = 1,
- .is_div_from_arm = 1,
- #ifdef CONFIG_I2C1_CONTROLLER_RK29
- .adap_type = I2C_RK29_ADAP,
- #endif
- #ifdef CONFIG_I2C1_CONTROLLER_RK30
- .adap_type = I2C_RK30_ADAP,
- #endif
+ .bus_num = 1,
+ .is_div_from_arm = 1,
+#ifdef CONFIG_I2C1_CONTROLLER_RK29
+ .adap_type = I2C_RK29_ADAP,
+#endif
+#ifdef CONFIG_I2C1_CONTROLLER_RK30
+ .adap_type = I2C_RK30_ADAP,
+#endif
};
+
static struct resource resources_i2c1[] = {
{
.start = IRQ_I2C1,
.id = 1,
.num_resources = ARRAY_SIZE(resources_i2c1),
.resource = resources_i2c1,
- .dev = {
+ .dev = {
.platform_data = &default_i2c1_data,
},
};
#endif
+
#ifdef CONFIG_I2C2_RK30
static struct rk30_i2c_platform_data default_i2c2_data = {
- .bus_num = 2,
- .is_div_from_arm = 0,
- #ifdef CONFIG_I2C2_CONTROLLER_RK29
- .adap_type = I2C_RK29_ADAP,
- #endif
- #ifdef CONFIG_I2C2_CONTROLLER_RK30
- .adap_type = I2C_RK30_ADAP,
- #endif
+ .bus_num = 2,
+ .is_div_from_arm = 0,
+#ifdef CONFIG_I2C2_CONTROLLER_RK29
+ .adap_type = I2C_RK29_ADAP,
+#endif
+#ifdef CONFIG_I2C2_CONTROLLER_RK30
+ .adap_type = I2C_RK30_ADAP,
+#endif
};
+
static struct resource resources_i2c2[] = {
{
.start = IRQ_I2C2,
.id = 2,
.num_resources = ARRAY_SIZE(resources_i2c2),
.resource = resources_i2c2,
- .dev = {
+ .dev = {
.platform_data = &default_i2c2_data,
},
};
#ifdef CONFIG_I2C3_RK30
static struct rk30_i2c_platform_data default_i2c3_data = {
- .bus_num = 3,
- .is_div_from_arm = 0,
- #ifdef CONFIG_I2C3_CONTROLLER_RK29
- .adap_type = I2C_RK29_ADAP,
- #endif
- #ifdef CONFIG_I2C3_CONTROLLER_RK30
- .adap_type = I2C_RK30_ADAP,
- #endif
+ .bus_num = 3,
+ .is_div_from_arm = 0,
+#ifdef CONFIG_I2C3_CONTROLLER_RK29
+ .adap_type = I2C_RK29_ADAP,
+#endif
+#ifdef CONFIG_I2C3_CONTROLLER_RK30
+ .adap_type = I2C_RK30_ADAP,
+#endif
};
+
static struct resource resources_i2c3[] = {
{
.start = IRQ_I2C3,
.id = 3,
.num_resources = ARRAY_SIZE(resources_i2c3),
.resource = resources_i2c3,
- .dev = {
+ .dev = {
.platform_data = &default_i2c3_data,
},
};
#endif
+
#ifdef CONFIG_I2C4_RK30
static struct rk30_i2c_platform_data default_i2c4_data = {
- .bus_num = 4,
- .is_div_from_arm = 0,
- #ifdef CONFIG_I2C4_CONTROLLER_RK29
- .adap_type = I2C_RK29_ADAP,
- #endif
- #ifdef CONFIG_I2C4_CONTROLLER_RK30
- .adap_type = I2C_RK30_ADAP,
- #endif
+ .bus_num = 4,
+ .is_div_from_arm = 0,
+#ifdef CONFIG_I2C4_CONTROLLER_RK29
+ .adap_type = I2C_RK29_ADAP,
+#endif
+#ifdef CONFIG_I2C4_CONTROLLER_RK30
+ .adap_type = I2C_RK30_ADAP,
+#endif
};
+
static struct resource resources_i2c4[] = {
{
.start = IRQ_I2C4,
.id = 4,
.num_resources = ARRAY_SIZE(resources_i2c4),
.resource = resources_i2c4,
- .dev = {
+ .dev = {
.platform_data = &default_i2c4_data,
},
};
}
//end of i2c
-
#ifdef CONFIG_MTD_NAND_RK29XX
static struct resource resources_nand[] = {
{