diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2012-05-15 03:25:50 -0400 |
---|---|---|
committer | Bob Liu <lliubbo@gmail.com> | 2012-05-21 02:55:00 -0400 |
commit | cf93feb3a0dee97c7896016a352a3226139fbcf4 (patch) | |
tree | e0d88605a39dd47b84992fcb6d6525d0f678bf6e /arch/blackfin/mach-bf548 | |
parent | 913f2f2df797c45e92ab527022cd49deb6eee3ab (diff) |
blackfin: twi: Move TWI peripheral pin request array to platform data
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch/blackfin/mach-bf548')
-rw-r--r-- | arch/blackfin/mach-bf548/boards/cm_bf548.c | 10 | ||||
-rw-r--r-- | arch/blackfin/mach-bf548/boards/ezkit.c | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c index 68af594db48e..e92543362f35 100644 --- a/arch/blackfin/mach-bf548/boards/cm_bf548.c +++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c | |||
@@ -1007,6 +1007,8 @@ static struct platform_device bf54x_spi_master1 = { | |||
1007 | #endif /* spi master and devices */ | 1007 | #endif /* spi master and devices */ |
1008 | 1008 | ||
1009 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 1009 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
1010 | static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; | ||
1011 | |||
1010 | static struct resource bfin_twi0_resource[] = { | 1012 | static struct resource bfin_twi0_resource[] = { |
1011 | [0] = { | 1013 | [0] = { |
1012 | .start = TWI0_REGBASE, | 1014 | .start = TWI0_REGBASE, |
@@ -1025,9 +1027,14 @@ static struct platform_device i2c_bfin_twi0_device = { | |||
1025 | .id = 0, | 1027 | .id = 0, |
1026 | .num_resources = ARRAY_SIZE(bfin_twi0_resource), | 1028 | .num_resources = ARRAY_SIZE(bfin_twi0_resource), |
1027 | .resource = bfin_twi0_resource, | 1029 | .resource = bfin_twi0_resource, |
1030 | .dev = { | ||
1031 | .platform_data = &bfin_twi0_pins, | ||
1032 | }, | ||
1028 | }; | 1033 | }; |
1029 | 1034 | ||
1030 | #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ | 1035 | #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ |
1036 | static const u16 bfin_twi1_pins[] = {P_TWI1_SCL, P_TWI1_SDA, 0}; | ||
1037 | |||
1031 | static struct resource bfin_twi1_resource[] = { | 1038 | static struct resource bfin_twi1_resource[] = { |
1032 | [0] = { | 1039 | [0] = { |
1033 | .start = TWI1_REGBASE, | 1040 | .start = TWI1_REGBASE, |
@@ -1046,6 +1053,9 @@ static struct platform_device i2c_bfin_twi1_device = { | |||
1046 | .id = 1, | 1053 | .id = 1, |
1047 | .num_resources = ARRAY_SIZE(bfin_twi1_resource), | 1054 | .num_resources = ARRAY_SIZE(bfin_twi1_resource), |
1048 | .resource = bfin_twi1_resource, | 1055 | .resource = bfin_twi1_resource, |
1056 | .dev = { | ||
1057 | .platform_data = &bfin_twi1_pins, | ||
1058 | }, | ||
1049 | }; | 1059 | }; |
1050 | #endif | 1060 | #endif |
1051 | #endif | 1061 | #endif |
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index 4f4bd918566c..3bd75bae750d 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -1252,6 +1252,8 @@ static struct platform_device bfin_capture_device = { | |||
1252 | #endif | 1252 | #endif |
1253 | 1253 | ||
1254 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 1254 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
1255 | static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; | ||
1256 | |||
1255 | static struct resource bfin_twi0_resource[] = { | 1257 | static struct resource bfin_twi0_resource[] = { |
1256 | [0] = { | 1258 | [0] = { |
1257 | .start = TWI0_REGBASE, | 1259 | .start = TWI0_REGBASE, |
@@ -1270,9 +1272,14 @@ static struct platform_device i2c_bfin_twi0_device = { | |||
1270 | .id = 0, | 1272 | .id = 0, |
1271 | .num_resources = ARRAY_SIZE(bfin_twi0_resource), | 1273 | .num_resources = ARRAY_SIZE(bfin_twi0_resource), |
1272 | .resource = bfin_twi0_resource, | 1274 | .resource = bfin_twi0_resource, |
1275 | .dev = { | ||
1276 | .platform_data = &bfin_twi0_pins, | ||
1277 | }, | ||
1273 | }; | 1278 | }; |
1274 | 1279 | ||
1275 | #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ | 1280 | #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ |
1281 | static const u16 bfin_twi1_pins[] = {P_TWI1_SCL, P_TWI1_SDA, 0}; | ||
1282 | |||
1276 | static struct resource bfin_twi1_resource[] = { | 1283 | static struct resource bfin_twi1_resource[] = { |
1277 | [0] = { | 1284 | [0] = { |
1278 | .start = TWI1_REGBASE, | 1285 | .start = TWI1_REGBASE, |
@@ -1291,6 +1298,9 @@ static struct platform_device i2c_bfin_twi1_device = { | |||
1291 | .id = 1, | 1298 | .id = 1, |
1292 | .num_resources = ARRAY_SIZE(bfin_twi1_resource), | 1299 | .num_resources = ARRAY_SIZE(bfin_twi1_resource), |
1293 | .resource = bfin_twi1_resource, | 1300 | .resource = bfin_twi1_resource, |
1301 | .dev = { | ||
1302 | .platform_data = &bfin_twi1_pins, | ||
1303 | }, | ||
1294 | }; | 1304 | }; |
1295 | #endif | 1305 | #endif |
1296 | #endif | 1306 | #endif |