diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2018-08-07 15:43:34 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:33:06 +0800 |
commit | acdcfa44b6cceb7d3ddf5b6b28ab14edab30d16c (patch) | |
tree | 2d9e64a64683a9cf96c8939d07848cc74f0362cf /arch/arm/mach-imx | |
parent | 49f7904786c609e8dff04ba90e1f1b6aceaf4c32 (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>
(cherry picked from commit 41cb188e5f4732c7fdb83894399c4dc1303fd774)
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/busfreq-imx.c | 11 |
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 2cbc033ad07a..b6aa072d412b 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) |