diff options
author | 2024-11-25 13:40:46 -0600 | |
---|---|---|
committer | 2024-11-25 13:40:46 -0600 | |
commit | 95e93032badb21e1d232c7e4a882fc359fa18a55 (patch) | |
tree | b587fccdac50f10f48bfd12730cc3b4371db0fa3 /drivers/pci/controller | |
parent | Merge branch 'pci/of' (diff) | |
parent | PCI: Enable runtime PM of the host bridge (diff) | |
download | wireguard-linux-95e93032badb21e1d232c7e4a882fc359fa18a55.tar.xz wireguard-linux-95e93032badb21e1d232c7e4a882fc359fa18a55.zip |
Merge branch 'pci/pm'
- Enable starfive controller runtime PM before probing host bridge (Mayank
Rana)
- Enable runtime power management for host bridges (Krishna chaitanya
chundru)
* pci/pm:
PCI: Enable runtime PM of the host bridge
PCI: starfive: Enable controller runtime PM before probing host bridge
Diffstat (limited to 'drivers/pci/controller')
-rw-r--r-- | drivers/pci/controller/plda/pcie-starfive.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/pci/controller/plda/pcie-starfive.c b/drivers/pci/controller/plda/pcie-starfive.c index 0567ec373a3e..e73c1b7bc8ef 100644 --- a/drivers/pci/controller/plda/pcie-starfive.c +++ b/drivers/pci/controller/plda/pcie-starfive.c @@ -404,6 +404,9 @@ static int starfive_pcie_probe(struct platform_device *pdev) if (ret) return ret; + pm_runtime_enable(&pdev->dev); + pm_runtime_get_sync(&pdev->dev); + plda->host_ops = &sf_host_ops; plda->num_events = PLDA_MAX_EVENT_NUM; /* mask doorbell event */ @@ -413,11 +416,12 @@ static int starfive_pcie_probe(struct platform_device *pdev) plda->events_bitmap <<= PLDA_NUM_DMA_EVENTS; ret = plda_pcie_host_init(&pcie->plda, &starfive_pcie_ops, &stf_pcie_event); - if (ret) + if (ret) { + pm_runtime_put_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); return ret; + } - pm_runtime_enable(&pdev->dev); - pm_runtime_get_sync(&pdev->dev); platform_set_drvdata(pdev, pcie); return 0; |