aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-n8x0.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-n8x0.c')
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index e710cd9e079b..8d74318ed495 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -106,14 +106,13 @@ static void __init n8x0_usb_init(void)
106 static char announce[] __initdata = KERN_INFO "TUSB 6010\n"; 106 static char announce[] __initdata = KERN_INFO "TUSB 6010\n";
107 107
108 /* PM companion chip power control pin */ 108 /* PM companion chip power control pin */
109 ret = gpio_request(TUSB6010_GPIO_ENABLE, "TUSB6010 enable"); 109 ret = gpio_request_one(TUSB6010_GPIO_ENABLE, GPIOF_OUT_INIT_LOW,
110 "TUSB6010 enable");
110 if (ret != 0) { 111 if (ret != 0) {
111 printk(KERN_ERR "Could not get TUSB power GPIO%i\n", 112 printk(KERN_ERR "Could not get TUSB power GPIO%i\n",
112 TUSB6010_GPIO_ENABLE); 113 TUSB6010_GPIO_ENABLE);
113 return; 114 return;
114 } 115 }
115 gpio_direction_output(TUSB6010_GPIO_ENABLE, 0);
116
117 tusb_set_power(0); 116 tusb_set_power(0);
118 117
119 ret = tusb6010_setup_interface(&tusb_data, TUSB6010_REFCLK_19, 2, 118 ret = tusb6010_setup_interface(&tusb_data, TUSB6010_REFCLK_19, 2,
@@ -494,8 +493,12 @@ static struct omap_mmc_platform_data mmc1_data = {
494 493
495static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC]; 494static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC];
496 495
497static void __init n8x0_mmc_init(void) 496static struct gpio n810_emmc_gpios[] __initdata = {
497 { N810_EMMC_VSD_GPIO, GPIOF_OUT_INIT_LOW, "MMC slot 2 Vddf" },
498 { N810_EMMC_VIO_GPIO, GPIOF_OUT_INIT_LOW, "MMC slot 2 Vdd" },
499};
498 500
501static void __init n8x0_mmc_init(void)
499{ 502{
500 int err; 503 int err;
501 504
@@ -512,27 +515,18 @@ static void __init n8x0_mmc_init(void)
512 mmc1_data.slots[1].ban_openended = 1; 515 mmc1_data.slots[1].ban_openended = 1;
513 } 516 }
514 517
515 err = gpio_request(N8X0_SLOT_SWITCH_GPIO, "MMC slot switch"); 518 err = gpio_request_one(N8X0_SLOT_SWITCH_GPIO, GPIOF_OUT_INIT_LOW,
519 "MMC slot switch");
516 if (err) 520 if (err)
517 return; 521 return;
518 522
519 gpio_direction_output(N8X0_SLOT_SWITCH_GPIO, 0);
520
521 if (machine_is_nokia_n810()) { 523 if (machine_is_nokia_n810()) {
522 err = gpio_request(N810_EMMC_VSD_GPIO, "MMC slot 2 Vddf"); 524 err = gpio_request_array(n810_emmc_gpios,
523 if (err) { 525 ARRAY_SIZE(n810_emmc_gpios));
524 gpio_free(N8X0_SLOT_SWITCH_GPIO);
525 return;
526 }
527 gpio_direction_output(N810_EMMC_VSD_GPIO, 0);
528
529 err = gpio_request(N810_EMMC_VIO_GPIO, "MMC slot 2 Vdd");
530 if (err) { 526 if (err) {
531 gpio_free(N8X0_SLOT_SWITCH_GPIO); 527 gpio_free(N8X0_SLOT_SWITCH_GPIO);
532 gpio_free(N810_EMMC_VSD_GPIO);
533 return; 528 return;
534 } 529 }
535 gpio_direction_output(N810_EMMC_VIO_GPIO, 0);
536 } 530 }
537 531
538 mmc_data[0] = &mmc1_data; 532 mmc_data[0] = &mmc1_data;