arm: tegra: cardhu: HSIC phy ready and phy off callbacks
Seshendra Gadagottu [Fri, 16 Sep 2011 11:48:01 +0000 (16:48 +0530)]
Implemented HSIC phy ready and phy off callabacks for
cardhu board.

BUG 828389

Reviewed-on: http://git-master/r/52883
(cherry picked from commit 9d2e1e07c00d1f84dc24ccb861c5fb9ca751cb9c)

Change-Id: I56e0fb118efb7670080355760eb05108b7d1f45a
Reviewed-on: http://git-master/r/58564
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Steve Lin <stlin@nvidia.com>

Rebase-Id: Rba43e610309a58a96c9fcb208338a7124f4310b9

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

index 6a48935..3ac3d43 100644 (file)
@@ -959,6 +959,22 @@ static int cardu_usb_hsic_preresume(void)
        return 0;
 }
 
+static int cardu_usb_hsic_phy_ready(void)
+{
+#ifdef CONFIG_TEGRA_BB_XMM_POWER
+       baseband_xmm_set_power_status(BBXMM_PS_L0);
+#endif
+       return 0;
+}
+
+static int cardu_usb_hsic_phy_off(void)
+{
+#ifdef CONFIG_TEGRA_BB_XMM_POWER
+       baseband_xmm_set_power_status(BBXMM_PS_L3);
+#endif
+       return 0;
+}
+
 static void cardhu_usb_init(void)
 {
        struct board_info bi;
@@ -983,6 +999,8 @@ static void cardhu_usb_init(void)
                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;
+               uhsic_phy_config.usb_phy_ready = cardu_usb_hsic_phy_ready;
+               uhsic_phy_config.post_phy_off = cardu_usb_hsic_phy_off;
                tegra_ehci2_device.dev.platform_data = &tegra_ehci_uhsic_pdata;
                /* baseband registration happens in baseband-xmm-power  */
        } else {