OSDN Git Service

blackfin: twi: Move TWI peripheral pin request array to platform data
authorSonic Zhang <sonic.zhang@analog.com>
Tue, 15 May 2012 07:25:50 +0000 (15:25 +0800)
committerBob Liu <lliubbo@gmail.com>
Mon, 21 May 2012 06:55:00 +0000 (14:55 +0800)
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
17 files changed:
arch/blackfin/mach-bf518/boards/ezbrd.c
arch/blackfin/mach-bf518/boards/tcm-bf518.c
arch/blackfin/mach-bf527/boards/ad7160eval.c
arch/blackfin/mach-bf527/boards/cm_bf527.c
arch/blackfin/mach-bf527/boards/ezbrd.c
arch/blackfin/mach-bf527/boards/ezkit.c
arch/blackfin/mach-bf527/boards/tll6527m.c
arch/blackfin/mach-bf537/boards/cm_bf537e.c
arch/blackfin/mach-bf537/boards/cm_bf537u.c
arch/blackfin/mach-bf537/boards/dnp5370.c
arch/blackfin/mach-bf537/boards/minotaur.c
arch/blackfin/mach-bf537/boards/stamp.c
arch/blackfin/mach-bf537/boards/tcm_bf537.c
arch/blackfin/mach-bf538/boards/ezkit.c
arch/blackfin/mach-bf548/boards/cm_bf548.c
arch/blackfin/mach-bf548/boards/ezkit.c
arch/blackfin/mach-bf609/boards/ezkit.c

index a173957..f8047ca 100644 (file)
@@ -529,6 +529,8 @@ static struct platform_device bfin_i2s = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -547,6 +549,9 @@ static struct platform_device i2c_bfin_twi_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 #endif
 
index 6eebee4..0bedc73 100644 (file)
@@ -455,6 +455,8 @@ static struct platform_device bfin_sir1_device = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -473,6 +475,9 @@ static struct platform_device i2c_bfin_twi_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 #endif
 
index 423381d..d58f50e 100644 (file)
@@ -569,6 +569,8 @@ static const struct ad7160_platform_data bfin_ad7160_ts_info = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -587,6 +589,9 @@ static struct platform_device i2c_bfin_twi_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 #endif
 
index 65b7fbd..413d013 100644 (file)
@@ -698,6 +698,8 @@ static struct platform_device bfin_sir1_device = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -716,6 +718,9 @@ static struct platform_device i2c_bfin_twi_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 #endif
 
index 17c6a24..50bda79 100644 (file)
@@ -576,6 +576,8 @@ static struct platform_device bfin_sir1_device = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -594,6 +596,9 @@ static struct platform_device i2c_bfin_twi_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 #endif
 
index 3196683..af732eb 100644 (file)
@@ -869,6 +869,8 @@ static struct platform_device bfin_sir1_device = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -887,6 +889,9 @@ static struct platform_device i2c_bfin_twi_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 #endif
 
index d192c0a..1509c5a 100644 (file)
@@ -656,6 +656,8 @@ static struct platform_device bfin_sir1_device = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -674,6 +676,9 @@ static struct platform_device i2c_bfin_twi_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 #endif
 
index 27fd2c3..9408ab5 100644 (file)
@@ -486,6 +486,8 @@ static struct platform_device bfin_sir1_device = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -504,6 +506,9 @@ static struct platform_device i2c_bfin_twi_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 #endif
 
index 3f3abad..0143d8b 100644 (file)
@@ -451,6 +451,8 @@ static struct platform_device bfin_sir1_device = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -469,6 +471,9 @@ static struct platform_device i2c_bfin_twi_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 #endif
 
index 6f77bf7..8bbf0a2 100644 (file)
@@ -329,6 +329,8 @@ static struct platform_device bfin_uart1_device = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -347,6 +349,9 @@ static struct platform_device i2c_bfin_twi_device = {
        .id            = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource      = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 #endif
 
index d2d7128..a10f90e 100644 (file)
@@ -386,6 +386,8 @@ static struct platform_device bfin_sir1_device = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -404,6 +406,9 @@ static struct platform_device i2c_bfin_twi_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 #endif
 
index ec3e5c1..c9d9473 100644 (file)
@@ -1790,6 +1790,8 @@ static struct platform_device bfin_sir1_device = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -1808,6 +1810,9 @@ static struct platform_device i2c_bfin_twi_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 #endif
 
index 3fb4218..e285c36 100644 (file)
@@ -453,6 +453,8 @@ static struct platform_device bfin_sir1_device = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -471,6 +473,9 @@ static struct platform_device i2c_bfin_twi_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 #endif
 
index 85038f5..a4fce03 100644 (file)
@@ -718,6 +718,8 @@ static struct platform_device bf538_spi_master2 = {
 };
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -736,9 +738,13 @@ static struct platform_device i2c_bfin_twi0_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 
-#if !defined(CONFIG_BF542)     /* The BF542 only has 1 TWI */
+static const u16 bfin_twi1_pins[] = {P_TWI1_SCL, P_TWI1_SDA, 0};
+
 static struct resource bfin_twi1_resource[] = {
        [0] = {
                .start = TWI1_REGBASE,
index 68af594..e925433 100644 (file)
@@ -1007,6 +1007,8 @@ static struct platform_device bf54x_spi_master1 = {
 #endif  /* spi master and devices */
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -1025,9 +1027,14 @@ static struct platform_device i2c_bfin_twi0_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 
 #if !defined(CONFIG_BF542)     /* The BF542 only has 1 TWI */
+static const u16 bfin_twi1_pins[] = {P_TWI1_SCL, P_TWI1_SDA, 0};
+
 static struct resource bfin_twi1_resource[] = {
        [0] = {
                .start = TWI1_REGBASE,
@@ -1046,6 +1053,9 @@ static struct platform_device i2c_bfin_twi1_device = {
        .id = 1,
        .num_resources = ARRAY_SIZE(bfin_twi1_resource),
        .resource = bfin_twi1_resource,
+       .dev = {
+               .platform_data = &bfin_twi1_pins,
+       },
 };
 #endif
 #endif
index 4f4bd91..3bd75ba 100644 (file)
@@ -1252,6 +1252,8 @@ static struct platform_device bfin_capture_device = {
 #endif
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_REGBASE,
@@ -1270,9 +1272,14 @@ static struct platform_device i2c_bfin_twi0_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 
 #if !defined(CONFIG_BF542)     /* The BF542 only has 1 TWI */
+static const u16 bfin_twi1_pins[] = {P_TWI1_SCL, P_TWI1_SDA, 0};
+
 static struct resource bfin_twi1_resource[] = {
        [0] = {
                .start = TWI1_REGBASE,
@@ -1291,6 +1298,9 @@ static struct platform_device i2c_bfin_twi1_device = {
        .id = 1,
        .num_resources = ARRAY_SIZE(bfin_twi1_resource),
        .resource = bfin_twi1_resource,
+       .dev = {
+               .platform_data = &bfin_twi1_pins,
+       },
 };
 #endif
 #endif
index cf0175a..ac64f47 100644 (file)
@@ -1081,6 +1081,8 @@ static struct platform_device bf60x_spi_master1 = {
 #endif  /* spi master and devices */
 
 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
+static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
+
 static struct resource bfin_twi0_resource[] = {
        [0] = {
                .start = TWI0_CLKDIV,
@@ -1099,8 +1101,13 @@ static struct platform_device i2c_bfin_twi0_device = {
        .id = 0,
        .num_resources = ARRAY_SIZE(bfin_twi0_resource),
        .resource = bfin_twi0_resource,
+       .dev = {
+               .platform_data = &bfin_twi0_pins,
+       },
 };
 
+static const u16 bfin_twi1_pins[] = {P_TWI1_SCL, P_TWI1_SDA, 0};
+
 static struct resource bfin_twi1_resource[] = {
        [0] = {
                .start = TWI1_CLKDIV,
@@ -1119,6 +1126,9 @@ static struct platform_device i2c_bfin_twi1_device = {
        .id = 1,
        .num_resources = ARRAY_SIZE(bfin_twi1_resource),
        .resource = bfin_twi1_resource,
+       .dev = {
+               .platform_data = &bfin_twi1_pins,
+       },
 };
 #endif