summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorAnson Huang <Anson.Huang@nxp.com>2018-08-07 15:43:34 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit15d3e4f2b88b6aa9e4fa583e44b70bdab5f67f95 (patch)
tree259c5dd55d032d961d89387dae478607dffe29bc /arch/arm/mach-imx
parent875c31a70f3527c59cc597a10a88c39f3a0095df (diff)
MLK-19149 ARM: imx: fix low bus mode hang on i.MX7D
Per design requirement, AHB clock parent switch and divider change needs to keep previous/current parent enabled but when we switch the clock parent, previous AHB clock parent may be disabled by common clock framework if the use count is 0, so here we have to make sure AHB's previous parent pfd2_270m is enabled during AHB set rate. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/busfreq-imx.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/busfreq-imx.c b/arch/arm/mach-imx/busfreq-imx.c
index b1a51a1c985e..d637b47e306c 100644
--- a/arch/arm/mach-imx/busfreq-imx.c
+++ b/arch/arm/mach-imx/busfreq-imx.c
@@ -618,6 +618,16 @@ static void exit_lpm_imx6sl(void)
static void enter_lpm_imx7d(void)
{
+ /*
+ * The AHB clock parent switch and divider change
+ * needs to keep previous/current parent enabled
+ * per design requirement, but when we switch the
+ * clock parent, previous AHB clock parent may be
+ * disabled by common clock framework, so here we
+ * have to make sure AHB's previous parent pfd2_270m
+ * is enabled during AHB set rate.
+ */
+ clk_prepare_enable(pfd2_270m);
if (audio_bus_count) {
clk_prepare_enable(pfd0_392m);
update_ddr_freq_imx_smp(HIGH_AUDIO_CLK);
@@ -647,6 +657,7 @@ static void enter_lpm_imx7d(void)
audio_bus_freq_mode = 0;
cur_bus_freq_mode = BUS_FREQ_LOW;
}
+ clk_disable_unprepare(pfd2_270m);
}
static void exit_lpm_imx7d(void)