summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorAjay Gupta <ajayg@nvidia.com>2013-05-17 14:29:06 -0700
committerHarshada Kale <hkale@nvidia.com>2013-06-03 04:07:10 -0700
commit8c59ce76e72d88eecaafeaf6ea31b2f7152310b3 (patch)
tree4b2f6492916bb62f83a95c31eebe9c48fef7f729 /drivers/usb
parent5207879cca8fcf1be59a530fc15a0aa611570084 (diff)
usb: xhci: tegra: enable SS VCORE only for active ports
Enabling SS VCORE only for active ports as passed by board file. Bug 1268244 Change-Id: Ifd2a04340c2b17d3e1410f233c3a6949050818a6 Signed-off-by: Ajay Gupta <ajayg@nvidia.com> Reviewed-on: http://git-master/r/229990 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ashutosh Jha <ajha@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci-tegra.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index 582794120985..105b59ba886b 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -888,15 +888,20 @@ tegra_xhci_ss_vcore(struct tegra_xhci_hcd *tegra, bool enable)
{
u32 elpg_program0;
-
/* Assert vcore_off signal */
elpg_program0 = readl(tegra->padctl_base + ELPG_PROGRAM_0);
- if (enable)
- elpg_program0 |= (SSP0_ELPG_VCORE_DOWN|SSP1_ELPG_VCORE_DOWN);
- else
- elpg_program0 &= ~(SSP0_ELPG_VCORE_DOWN|SSP1_ELPG_VCORE_DOWN);
-
+ if (enable) {
+ if (tegra->bdata->portmap & TEGRA_XUSB_SS_P0)
+ elpg_program0 |= SSP0_ELPG_VCORE_DOWN;
+ if (tegra->bdata->portmap & TEGRA_XUSB_SS_P1)
+ elpg_program0 |= SSP1_ELPG_VCORE_DOWN;
+ } else {
+ if (tegra->bdata->portmap & TEGRA_XUSB_SS_P0)
+ elpg_program0 &= ~SSP0_ELPG_VCORE_DOWN;
+ if (tegra->bdata->portmap & TEGRA_XUSB_SS_P1)
+ elpg_program0 &= ~SSP1_ELPG_VCORE_DOWN;
+ }
writel(elpg_program0, tegra->padctl_base + ELPG_PROGRAM_0);
}