usb: xhci: fix tctrl rctrl war programming
Krishna Yarlagadda [Fri, 13 Sep 2013 12:23:24 +0000 (17:23 +0530)]
WAR requires that tctrl and rctrl values to be updated in
pmc register space even if pmc is not in control of ports.
Fixing it.

Bug 1334159

Change-Id: I4cd7054b17716298a3174eed8bf41b8fe3b4ab7e
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/274381
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

drivers/usb/host/xhci-tegra.c

index 169ffd9..d9a4f09 100644 (file)
@@ -2908,8 +2908,14 @@ static void tegra_xhci_war_for_tctrl_rctrl(struct tegra_xhci_hcd *tegra)
                writel(reg, tegra->padctl_base + padregs->usb2_bias_pad_ctl0_0);
 
                /* Program these values into PMC regiseter and program the
-                * PMC override. This will be done as part of pmc setup
+                * PMC override.
                 */
+               reg = PMC_TCTRL_VAL(utmip_tctrl_val) |
+                               PMC_RCTRL_VAL(utmip_rctrl_val);
+               tegra_usb_pmc_reg_update(PMC_UTMIP_TERM_PAD_CFG,
+                                       0xffffffff, reg);
+               reg = UTMIP_RCTRL_USE_PMC_P2 | UTMIP_TCTRL_USE_PMC_P2;
+               tegra_usb_pmc_reg_update(PMC_SLEEP_CFG, reg, reg);
        } else {
                /* Use common PMC API to use SNPS register space */
                utmi_phy_set_snps_trking_data();