arm: tegra: cardhu: Modify modem w_disable control.
Raj Jayaraman [Mon, 13 Jun 2011 21:18:41 +0000 (14:18 -0700)]
Gpio controlling w_disable has changed since Fab3.
Modify it accordingly.

Bug 819563

Original-Change-Id: Idbeb9467168aa91c5cf942f72ec5d581a28dc4d1
Reviewed-on: http://git-master/r/36368
Reviewed-by: Niket Sirsi <nsirsi@nvidia.com>
Tested-by: Niket Sirsi <nsirsi@nvidia.com>

Rebase-Id: R9f571abed87a8da6005f2933d2292f502b05d977

arch/arm/mach-tegra/board-cardhu.c

index 229ba3d..2b98acd 100644 (file)
@@ -562,7 +562,23 @@ static void cardhu_gps_init(void)
 
 static void cardhu_modem_init(void)
 {
-       tegra_gpio_enable(TEGRA_GPIO_PH5);
+       struct board_info board_info;
+       int w_disable_gpio;
+
+       tegra_get_board_info(&board_info);
+       switch (board_info.board_id) {
+       case BOARD_E1291:
+               if (board_info.fab < 0x3) {
+                       w_disable_gpio = TEGRA_GPIO_PH5;
+               } else {
+                       w_disable_gpio = TEGRA_GPIO_PDD5;
+               }
+               tegra_gpio_enable(w_disable_gpio);
+               gpio_direction_input(w_disable_gpio);
+               break;
+       default:
+               break;
+       }
 }
 
 #ifdef CONFIG_SATA_AHCI_TEGRA