Revert "spi: spi-zynqmp-gqspi: Fix runtime PM imbalance in zynqmp_qspi_probe"
This reverts commit 2cdec9c13f
.
Reported issues with the backport, revert for now.
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
649237ccf4
commit
1ceaf0d3a8
@@ -1147,16 +1147,11 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
|
|||||||
pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
|
pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
|
||||||
pm_runtime_set_active(&pdev->dev);
|
pm_runtime_set_active(&pdev->dev);
|
||||||
pm_runtime_enable(&pdev->dev);
|
pm_runtime_enable(&pdev->dev);
|
||||||
|
|
||||||
ret = pm_runtime_get_sync(&pdev->dev);
|
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(&pdev->dev, "Failed to pm_runtime_get_sync: %d\n", ret);
|
|
||||||
goto clk_dis_all;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* QSPI controller initializations */
|
/* QSPI controller initializations */
|
||||||
zynqmp_qspi_init_hw(xqspi);
|
zynqmp_qspi_init_hw(xqspi);
|
||||||
|
|
||||||
|
pm_runtime_mark_last_busy(&pdev->dev);
|
||||||
|
pm_runtime_put_autosuspend(&pdev->dev);
|
||||||
xqspi->irq = platform_get_irq(pdev, 0);
|
xqspi->irq = platform_get_irq(pdev, 0);
|
||||||
if (xqspi->irq <= 0) {
|
if (xqspi->irq <= 0) {
|
||||||
ret = -ENXIO;
|
ret = -ENXIO;
|
||||||
@@ -1183,7 +1178,6 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
|
|||||||
ctlr->mode_bits = SPI_CPOL | SPI_CPHA | SPI_RX_DUAL | SPI_RX_QUAD |
|
ctlr->mode_bits = SPI_CPOL | SPI_CPHA | SPI_RX_DUAL | SPI_RX_QUAD |
|
||||||
SPI_TX_DUAL | SPI_TX_QUAD;
|
SPI_TX_DUAL | SPI_TX_QUAD;
|
||||||
ctlr->dev.of_node = np;
|
ctlr->dev.of_node = np;
|
||||||
ctlr->auto_runtime_pm = true;
|
|
||||||
|
|
||||||
ret = devm_spi_register_controller(&pdev->dev, ctlr);
|
ret = devm_spi_register_controller(&pdev->dev, ctlr);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
@@ -1191,13 +1185,9 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
|
|||||||
goto clk_dis_all;
|
goto clk_dis_all;
|
||||||
}
|
}
|
||||||
|
|
||||||
pm_runtime_mark_last_busy(&pdev->dev);
|
|
||||||
pm_runtime_put_autosuspend(&pdev->dev);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
clk_dis_all:
|
clk_dis_all:
|
||||||
pm_runtime_put_sync(&pdev->dev);
|
|
||||||
pm_runtime_set_suspended(&pdev->dev);
|
pm_runtime_set_suspended(&pdev->dev);
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
clk_disable_unprepare(xqspi->refclk);
|
clk_disable_unprepare(xqspi->refclk);
|
||||||
|
Reference in New Issue
Block a user