Skip to content

Commit

Permalink
blackfin: twi: Move TWI peripheral pin request array to platform data
Browse files Browse the repository at this point in the history
Signed-off-by: Sonic Zhang <[email protected]>
Signed-off-by: Bob Liu <[email protected]>
  • Loading branch information
sonicz authored and aet00 committed May 21, 2012
1 parent 913f2f2 commit cf93feb
Show file tree
Hide file tree
Showing 17 changed files with 102 additions and 1 deletion.
5 changes: 5 additions & 0 deletions arch/blackfin/mach-bf518/boards/ezbrd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions arch/blackfin/mach-bf518/boards/tcm-bf518.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions arch/blackfin/mach-bf527/boards/ad7160eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions arch/blackfin/mach-bf527/boards/cm_bf527.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions arch/blackfin/mach-bf527/boards/ezbrd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions arch/blackfin/mach-bf527/boards/ezkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions arch/blackfin/mach-bf527/boards/tll6527m.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions arch/blackfin/mach-bf537/boards/cm_bf537e.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions arch/blackfin/mach-bf537/boards/cm_bf537u.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions arch/blackfin/mach-bf537/boards/dnp5370.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions arch/blackfin/mach-bf537/boards/minotaur.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions arch/blackfin/mach-bf537/boards/stamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions arch/blackfin/mach-bf537/boards/tcm_bf537.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
8 changes: 7 additions & 1 deletion arch/blackfin/mach-bf538/boards/ezkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
10 changes: 10 additions & 0 deletions arch/blackfin/mach-bf548/boards/cm_bf548.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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
Expand Down
10 changes: 10 additions & 0 deletions arch/blackfin/mach-bf548/boards/ezkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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
Expand Down
10 changes: 10 additions & 0 deletions arch/blackfin/mach-bf609/boards/ezkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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

Expand Down

0 comments on commit cf93feb

Please sign in to comment.