aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/host/pci-imx6.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/host/pci-imx6.c')
-rw-r--r--drivers/pci/host/pci-imx6.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
index 233fe8a88264..69202d1eb8fb 100644
--- a/drivers/pci/host/pci-imx6.c
+++ b/drivers/pci/host/pci-imx6.c
@@ -275,15 +275,22 @@ static int imx6_pcie_deassert_core_reset(struct pcie_port *pp)
275 goto err_pcie; 275 goto err_pcie;
276 } 276 }
277 277
278 /* allow the clocks to stabilize */
279 usleep_range(200, 500);
280
281 /* power up core phy and enable ref clock */ 278 /* power up core phy and enable ref clock */
282 regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, 279 regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1,
283 IMX6Q_GPR1_PCIE_TEST_PD, 0 << 18); 280 IMX6Q_GPR1_PCIE_TEST_PD, 0 << 18);
281 /*
282 * the async reset input need ref clock to sync internally,
283 * when the ref clock comes after reset, internal synced
284 * reset time is too short, cannot meet the requirement.
285 * add one ~10us delay here.
286 */
287 udelay(10);
284 regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, 288 regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1,
285 IMX6Q_GPR1_PCIE_REF_CLK_EN, 1 << 16); 289 IMX6Q_GPR1_PCIE_REF_CLK_EN, 1 << 16);
286 290
291 /* allow the clocks to stabilize */
292 usleep_range(200, 500);
293
287 /* Some boards don't have PCIe reset GPIO. */ 294 /* Some boards don't have PCIe reset GPIO. */
288 if (gpio_is_valid(imx6_pcie->reset_gpio)) { 295 if (gpio_is_valid(imx6_pcie->reset_gpio)) {
289 gpio_set_value(imx6_pcie->reset_gpio, 0); 296 gpio_set_value(imx6_pcie->reset_gpio, 0);