arm: tegra: cardhu: HSIC config change for xmm modem
Seshendra Gadagottu [Fri, 19 Aug 2011 14:40:41 +0000 (19:40 +0530)]
Avoid power down HSIC phy during L2 suspend state.
Triggered postsuspend and preresume actions for xmm modem.
BUG 828389

Original-Change-Id: I2cd862361d5ba0fedf7e7bffac02c0dfbf5cf0c8
Reviewed-on: http://git-master/r/46654
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R07b042064157d92b288da906c040b083d62df743

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

index b576a23..5148b38 100644 (file)
@@ -949,6 +949,18 @@ static struct usb_phy_plat_data tegra_usb_phy_pdata[] = {
        },
 };
 
+static int cardu_usb_hsic_postsupend(void)
+{
+       baseband_xmm_set_power_status(BBXMM_PS_L2);
+       return 0;
+}
+
+static int cardu_usb_hsic_preresume(void)
+{
+       baseband_xmm_set_power_status(BBXMM_PS_L2TOL0);
+       return 0;
+}
+
 static void cardhu_usb_init(void)
 {
        struct board_info bi;
@@ -969,6 +981,10 @@ static void cardhu_usb_init(void)
                tegra_ehci2_device.dev.platform_data = &tegra_ehci_uhsic_pdata;
                platform_device_register(&tegra_ehci2_device);
        } else if (bi.board_id == BOARD_E1186) {
+               /* for baseband devices do not switch off phy during suspend */
+               tegra_ehci_uhsic_pdata.power_down_on_bus_suspend = 0;
+               uhsic_phy_config.postsuspend = cardu_usb_hsic_postsupend;
+               uhsic_phy_config.preresume = cardu_usb_hsic_preresume;
                tegra_ehci2_device.dev.platform_data = &tegra_ehci_uhsic_pdata;
                /* baseband registration happens in baseband-xmm-power  */
        } else {