diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2019-12-10 14:01:58 +0800 |
---|---|---|
committer | Anson Huang <Anson.Huang@nxp.com> | 2019-12-10 14:19:08 +0800 |
commit | 1971f2280eccbe0d9b806fa4a9a10a0f0e6400b6 (patch) | |
tree | 1770362d1d6921e3ab1dfe24696c1ab8ca9a8b39 /arch/arm/mach-imx/busfreq-imx.c | |
parent | 61dc1220f1d15c7adaa370f0f869c22c94a358ad (diff) |
LF-388 ARM: imx: Add AXI clock parent switch for i.MX6DL low bus mode
On i.MX6DL, AXI clock is from 540M PFD in normal mode, and from periph
clk in low bus mode, so need to make sure AXI clock parent switch
correctly in normal mode and low bus mode.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Diffstat (limited to 'arch/arm/mach-imx/busfreq-imx.c')
-rw-r--r-- | arch/arm/mach-imx/busfreq-imx.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/busfreq-imx.c b/arch/arm/mach-imx/busfreq-imx.c index 1efaef308ebe..026f9a8090ae 100644 --- a/arch/arm/mach-imx/busfreq-imx.c +++ b/arch/arm/mach-imx/busfreq-imx.c @@ -131,6 +131,7 @@ static struct clk *pll1_bypass_clk; static struct clk *pll1_sys_clk; static struct clk *pll1_sw_clk; +static struct clk *axi_alt_sel_clk; static struct clk *pll3_pfd1_540m_clk; static struct clk *ocram_clk; @@ -407,7 +408,8 @@ static void exit_lpm_imx6_smp(void) clk_set_parent(periph_clk, periph_pre_clk); if (cpu_is_imx6dl()) { /* Set axi to pll3_pfd1_540m */ - clk_set_parent(axi_sel_clk, pll3_pfd1_540m_clk); + clk_set_parent(axi_alt_sel_clk, pll3_pfd1_540m_clk); + clk_set_parent(axi_sel_clk, axi_alt_sel_clk); } /* * As periph_pre_clk's parent is not changed from @@ -1130,9 +1132,11 @@ static int busfreq_probe(struct platform_device *pdev) } if (cpu_is_imx6dl()) { + axi_alt_sel_clk = devm_clk_get(&pdev->dev, "axi_alt_sel"); axi_sel_clk = devm_clk_get(&pdev->dev, "axi_sel"); pll3_pfd1_540m_clk = devm_clk_get(&pdev->dev, "pll3_pfd1_540m"); - if (IS_ERR(axi_sel_clk) || IS_ERR(pll3_pfd1_540m_clk)) { + if (IS_ERR(axi_alt_sel_clk) || IS_ERR(axi_sel_clk) + || IS_ERR(pll3_pfd1_540m_clk)) { dev_err(busfreq_dev, "%s: failed to get busfreq clk\n", __func__); return -EINVAL; |