MLK-22293-9 imx6: clock: Enable sata clock for imx AHCI
authorYe Li <ye.li@nxp.com>
Tue, 23 Jul 2019 03:50:41 +0000 (20:50 -0700)
committerYe Li <ye.li@nxp.com>
Thu, 29 Apr 2021 07:56:28 +0000 (00:56 -0700)
We reuse current sata clock interface in imx AHCI for imx6q/qp. So
enable them when the config is set

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 112ee99236f6d7d97f94ccf1d065ec577a118f80)
(cherry picked from commit 37573e731bd6c43b39cba82e552e2e63d49dcc75)

arch/arm/mach-imx/mx6/clock.c

index a0f256e..7a9007b 100644 (file)
@@ -1121,7 +1121,7 @@ u32 imx_get_fecclk(void)
        return mxc_get_clock(MXC_IPG_CLK);
 }
 
-#if defined(CONFIG_SATA) || defined(CONFIG_PCIE_IMX)
+#if defined(CONFIG_SATA) || defined(CONFIG_IMX_AHCI) || defined(CONFIG_PCIE_IMX)
 static int enable_enet_pll(uint32_t en)
 {
        struct mxc_ccm_reg *const imx_ccm
@@ -1148,7 +1148,7 @@ static int enable_enet_pll(uint32_t en)
 }
 #endif
 
-#ifdef CONFIG_SATA
+#if defined(CONFIG_SATA) || defined(CONFIG_IMX_AHCI)
 static void ungate_sata_clock(void)
 {
        struct mxc_ccm_reg *const imx_ccm =
@@ -1232,7 +1232,7 @@ int enable_pcie_clock(void)
 
        if (!is_mx6sx()) {
        /* Party time! Ungate the clock to the PCIe. */
-#ifdef CONFIG_SATA
+#if defined(CONFIG_SATA) || defined(CONFIG_IMX_AHCI)
                ungate_sata_clock();
 #endif
                ungate_pcie_clock();