aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-3430sdp.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-06-07 03:28:54 -0400
committerPeter Ujfalusi <peter.ujfalusi@ti.com>2011-07-04 11:43:38 -0400
commit827ed9aef2f13000d58616384ea6a22497e787b6 (patch)
treefd6d117feaa7ac9c9e6195224efff07f230e867a /arch/arm/mach-omap2/board-3430sdp.c
parentb22f954bae35be115a10c6426dc070f7d652b32e (diff)
OMAP3: Move common twl configuration to twl-common
Reduce the amount of duplicated code by moving the common configuration for twl4030/5030/tpsxx to the twl-common file. Use the omap3_pmic_get_config function from board files to properly configure the PMIC with the common fields. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-3430sdp.c')
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c42
1 files changed, 4 insertions, 38 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 12fae21346cf..8bbd4e0246b0 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -231,22 +231,6 @@ static void __init omap_3430sdp_init_early(void)
231 omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL); 231 omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);
232} 232}
233 233
234static int sdp3430_batt_table[] = {
235/* 0 C*/
23630800, 29500, 28300, 27100,
23726000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
23817200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
23911600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
2408020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
2415640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
2424040, 3910, 3790, 3670, 3550
243};
244
245static struct twl4030_bci_platform_data sdp3430_bci_data = {
246 .battery_tmp_tbl = sdp3430_batt_table,
247 .tblsize = ARRAY_SIZE(sdp3430_batt_table),
248};
249
250static struct omap2_hsmmc_info mmc[] = { 234static struct omap2_hsmmc_info mmc[] = {
251 { 235 {
252 .mmc = 1, 236 .mmc = 1,
@@ -292,14 +276,6 @@ static struct twl4030_gpio_platform_data sdp3430_gpio_data = {
292 .setup = sdp3430_twl_gpio_setup, 276 .setup = sdp3430_twl_gpio_setup,
293}; 277};
294 278
295static struct twl4030_usb_data sdp3430_usb_data = {
296 .usb_mode = T2_USB_MODE_ULPI,
297};
298
299static struct twl4030_madc_platform_data sdp3430_madc_data = {
300 .irq_line = 1,
301};
302
303/* regulator consumer mappings */ 279/* regulator consumer mappings */
304 280
305/* ads7846 on SPI */ 281/* ads7846 on SPI */
@@ -463,24 +439,10 @@ static struct regulator_init_data sdp3430_vpll2 = {
463 .consumer_supplies = sdp3430_vpll2_supplies, 439 .consumer_supplies = sdp3430_vpll2_supplies,
464}; 440};
465 441
466static struct twl4030_codec_audio_data sdp3430_audio;
467
468static struct twl4030_codec_data sdp3430_codec = {
469 .audio_mclk = 26000000,
470 .audio = &sdp3430_audio,
471};
472
473static struct twl4030_platform_data sdp3430_twldata = { 442static struct twl4030_platform_data sdp3430_twldata = {
474 .irq_base = TWL4030_IRQ_BASE,
475 .irq_end = TWL4030_IRQ_END,
476
477 /* platform_data for children goes here */ 443 /* platform_data for children goes here */
478 .bci = &sdp3430_bci_data,
479 .gpio = &sdp3430_gpio_data, 444 .gpio = &sdp3430_gpio_data,
480 .madc = &sdp3430_madc_data,
481 .keypad = &sdp3430_kp_data, 445 .keypad = &sdp3430_kp_data,
482 .usb = &sdp3430_usb_data,
483 .codec = &sdp3430_codec,
484 446
485 .vaux1 = &sdp3430_vaux1, 447 .vaux1 = &sdp3430_vaux1,
486 .vaux2 = &sdp3430_vaux2, 448 .vaux2 = &sdp3430_vaux2,
@@ -496,7 +458,11 @@ static struct twl4030_platform_data sdp3430_twldata = {
496static int __init omap3430_i2c_init(void) 458static int __init omap3430_i2c_init(void)
497{ 459{
498 /* i2c1 for PMIC only */ 460 /* i2c1 for PMIC only */
461 omap3_pmic_get_config(&sdp3430_twldata,
462 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
463 TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, 0);
499 omap3_pmic_init("twl4030", &sdp3430_twldata); 464 omap3_pmic_init("twl4030", &sdp3430_twldata);
465
500 /* i2c2 on camera connector (for sensor control) and optional isp1301 */ 466 /* i2c2 on camera connector (for sensor control) and optional isp1301 */
501 omap_register_i2c_bus(2, 400, NULL, 0); 467 omap_register_i2c_bus(2, 400, NULL, 0);
502 /* i2c3 on display connector (for DVI, tfp410) */ 468 /* i2c3 on display connector (for DVI, tfp410) */