aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/host/pci-tegra.c
diff options
context:
space:
mode:
authorEric Yuen <eyuen@nvidia.com>2014-08-26 11:11:37 -0400
committerBjorn Helgaas <bhelgaas@google.com>2014-09-16 18:55:33 -0400
commitec73276204f06b6446a9c9b70173a1c15f6de536 (patch)
treee662f3fd15fe8b9f98e7cbcde7e6bc4227a44823 /drivers/pci/host/pci-tegra.c
parent8d41794c6fc61ac2f09b5c25267e2c68748326cc (diff)
PCI: tegra: Make sure the PCIe PLL is really reset
Depending on the prior state of the controller, the PLL reset may not be pulsed. Clear the register bit and set it after a small delay to ensure that the PLL is really reset. Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Eric Yuen <eyuen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/host/pci-tegra.c')
-rw-r--r--drivers/pci/host/pci-tegra.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 6329be3d4695..79fd92c969a9 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -849,6 +849,13 @@ static int tegra_pcie_enable_controller(struct tegra_pcie *pcie)
849 value |= PADS_PLL_CTL_REFCLK_INTERNAL_CML | soc->tx_ref_sel; 849 value |= PADS_PLL_CTL_REFCLK_INTERNAL_CML | soc->tx_ref_sel;
850 pads_writel(pcie, value, soc->pads_pll_ctl); 850 pads_writel(pcie, value, soc->pads_pll_ctl);
851 851
852 /* reset PLL */
853 value = pads_readl(pcie, soc->pads_pll_ctl);
854 value &= ~PADS_PLL_CTL_RST_B4SM;
855 pads_writel(pcie, value, soc->pads_pll_ctl);
856
857 usleep_range(20, 100);
858
852 /* take PLL out of reset */ 859 /* take PLL out of reset */
853 value = pads_readl(pcie, soc->pads_pll_ctl); 860 value = pads_readl(pcie, soc->pads_pll_ctl);
854 value |= PADS_PLL_CTL_RST_B4SM; 861 value |= PADS_PLL_CTL_RST_B4SM;