diff options
author | Haribabu Narayanan <hnarayanan@nvidia.com> | 2014-06-02 19:28:42 -0700 |
---|---|---|
committer | Matthew Pedro <mapedro@nvidia.com> | 2014-09-16 21:34:42 -0700 |
commit | 807725d6864bacd838489bb52ee790f7ce6dbf4c (patch) | |
tree | 27b65874af41d80bb38d341b2ade56bb6107f066 /drivers/usb/host | |
parent | a88ce700174d1957f7378f07ceb1f3c1e46cae98 (diff) |
usb: xhci: tegra: remove conditional powergating
The powergate module now maintains reference count for PCIE. Remove conditional
checks in XHCI driver before invoking powergating APIs.
Bug 1451279
Bug 1455032
Bug 200027067
Change-Id: I186270dc86fba78a8c321ba5923382e642b14b60
Reviewed-on: http://git-master/r/418061
(cherry picked from commit b0f746945fccf025e2ab1764c0cc35eb1bc780b3)
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/498660
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/xhci-tegra.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index 3834882320b3..1a378a95d518 100644 --- a/drivers/usb/host/xhci-tegra.c +++ b/drivers/usb/host/xhci-tegra.c @@ -2712,13 +2712,11 @@ static int tegra_xhci_host_elpg_entry(struct tegra_xhci_hcd *tegra) /* TODO: error handling? */ return ret; } - if (tegra_powergate_is_powered(TEGRA_POWERGATE_PCIE)) { - ret = tegra_powergate_partition(TEGRA_POWERGATE_PCIE); - if (ret) { - xhci_err(xhci, "%s: could not powergate pex partition %d\n", - __func__, ret); - return ret; - } + ret = tegra_powergate_partition(TEGRA_POWERGATE_PCIE); + if (ret) { + xhci_err(xhci, "%s: could not powergate pex partition %d\n", + __func__, ret); + return ret; } tegra->host_pwr_gated = true; clk_disable(tegra->host_clk); @@ -3048,13 +3046,11 @@ tegra_xhci_host_partition_elpg_exit(struct tegra_xhci_hcd *tegra) goto out; } /* unpwrgate PEX(if not done by PCIE driver) due to HW Bug1320346 */ - if (!tegra_powergate_is_powered(TEGRA_POWERGATE_PCIE)) { - ret = tegra_unpowergate_partition(TEGRA_POWERGATE_PCIE); - if (ret) { - xhci_err(xhci, "%s: could not unpowergate pex partition %d\n", - __func__, ret); - goto out; - } + ret = tegra_unpowergate_partition(TEGRA_POWERGATE_PCIE); + if (ret) { + xhci_err(xhci, "%s: could not unpowergate pex partition %d\n", + __func__, ret); + goto out; } clk_enable(tegra->host_clk); @@ -4438,11 +4434,9 @@ static int tegra_xhci_probe(struct platform_device *pdev) dev_err(&pdev->dev, "could not unpowergate xusbc partition\n"); /* unpwrgate PEX(if not done by PCIE driver) due to HW Bug1320346 */ - if (!tegra_powergate_is_powered(TEGRA_POWERGATE_PCIE)) { - ret = tegra_unpowergate_partition(TEGRA_POWERGATE_PCIE); - if (ret) - dev_err(&pdev->dev, "could not unpowergate pex partition\n"); - } + ret = tegra_unpowergate_partition(TEGRA_POWERGATE_PCIE); + if (ret) + dev_err(&pdev->dev, "could not unpowergate pex partition\n"); ret = tegra_enable_xusb_clk(tegra, pdev); if (ret) |