summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Eichenberger <stefan.eichenberger@toradex.com>2023-04-26 09:27:51 +0200
committerFrancesco Dolcini <francesco.dolcini@toradex.com>2023-04-27 11:11:03 +0000
commit2b311be08a61793e26757d5239ad9b79222962e5 (patch)
tree746b60a23a21060e2896be55d6627b335929c1db
parent703cbb056390ee5a8d29f8d6260bae8b0c4ce1a5 (diff)
ata: ahci-imx: Do not disable APB clock
There is a clock dependency between the ahci-imx driver and the PCIe driver on i.MX8 which causes the PCIe link to never come up. It happens every 20-100 reboots when the SATA driver probes before PCIe. By never disabling the APB clock in the SATA driver this issue goes away. In BSP5 we compiled the SATA driver as a module and the SATA driver was probing after the PCIe driver, therefore we could not see the issue there. Upstream-Status: Inappropriate [other] This is an ugly workaround that should not land upstream. We try to get help from NXP regarding this issue to find a proper solution. Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
-rw-r--r--drivers/ata/ahci_imx.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index f038267c4068..c717fed2e532 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -614,7 +614,6 @@ disable_per_clk1:
disable_per_clk0:
clk_disable_unprepare(imxpriv->per_clk0);
disable_phy_apbclk:
- clk_disable_unprepare(imxpriv->phy_apbclk);
disable_epcs_rx_clk:
clk_disable_unprepare(imxpriv->epcs_rx_clk);
disable_epcs_tx_clk:
@@ -882,14 +881,12 @@ static int imx8_sata_enable(struct ahci_host_priv *hpriv)
* To reduce the power consumption, gate off
* the PHY clks
*/
- clk_disable_unprepare(imxpriv->phy_apbclk);
clk_disable_unprepare(imxpriv->phy_pclk1);
clk_disable_unprepare(imxpriv->phy_pclk0);
return ret;
}
err_out:
- clk_disable_unprepare(imxpriv->phy_apbclk);
clk_disable_unprepare(imxpriv->phy_pclk1);
clk_disable_unprepare(imxpriv->phy_pclk0);
imx8_sata_clk_disable(imxpriv);