diff options
author | richard zhu <hongxing.zhu@nxp.com> | 2019-11-08 09:30:54 +0800 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 16:29:17 +0800 |
commit | c4ba50059576f8a01adc952d3a37c0c3c5120123 (patch) | |
tree | 3acecfc5ecf2e8df63321b125527375bfc843c94 /drivers/pci/controller/dwc/pci-imx6.c | |
parent | 764a31f31823776c78a6e6fb67647b0289dc2ff6 (diff) |
PCI: imx: enable the epdev_on regulator after possible -EPROBE_DEFER
Enable the epdev_on regulator after possible -EPROBE_DEFER.
Otherwise, there would kernel WARNING dump if there is -EPROBE_DEFER
later during boot procedure.
[ 1.335146] WARNING: CPU: 1 PID: 7 at drivers/regulator/core.c:2042 _regulator_put.part.27+0x140/0x148
[ 1.344423] Modules linked in:
[ 1.347470] CPU: 1 PID: 7 Comm: kworker/u4:0 Not tainted 5.4.0-rc5-02973-ged0629621d25 #15
[ 1.355716] Hardware name: Freescale i.MX8DXL Phantom MEK (DT)
[ 1.361547] Workqueue: events_unbound async_run_entry_fn
[ 1.366838] pstate: 80000005 (Nzcv daif -PAN -UAO)
[ 1.368962] Bus freq driver module loaded
[ 1.371620] pc : _regulator_put.part.27+0x140/0x148
[ 1.371628] lr : regulator_put+0x34/0x48
[ 1.384384] sp : ffff80001005bc20
[ 1.387685] x29: ffff80001005bc20 x28: 0000000000000000
[ 1.391866] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 1.392986] x27: 0000000000000000 x26: ffff8000100fddf0
[ 1.392992] x25: 0000000000000000 x24: 0000000000000007
[ 1.392997] x23: ffff80001005bcd8 x22: ffff000029844600
Signed-off-by: richard zhu <hongxing.zhu@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Diffstat (limited to 'drivers/pci/controller/dwc/pci-imx6.c')
-rw-r--r-- | drivers/pci/controller/dwc/pci-imx6.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 03ad226e265b..12c3d862f11d 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1727,10 +1727,6 @@ static int imx6_pcie_probe(struct platform_device *pdev) if (IS_ERR(imx6_pcie->epdev_on)) return -EPROBE_DEFER; - ret = regulator_enable(imx6_pcie->epdev_on); - if (ret) - dev_err(dev, "failed to enable the epdev_on regulator\n"); - imx6_pcie->reset_gpio = of_get_named_gpio(node, "reset-gpio", 0); imx6_pcie->gpio_active_high = of_property_read_bool(node, "reset-gpio-active-high"); @@ -1748,6 +1744,10 @@ static int imx6_pcie_probe(struct platform_device *pdev) return imx6_pcie->reset_gpio; } + ret = regulator_enable(imx6_pcie->epdev_on); + if (ret) + dev_err(dev, "failed to enable the epdev_on regulator\n"); + /* Fetch clocks */ imx6_pcie->pcie_phy = devm_clk_get(dev, "pcie_phy"); if (IS_ERR(imx6_pcie->pcie_phy)) { |