summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/clk-imx6sx.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@freescale.com>2014-05-26 16:37:25 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-04-14 14:00:02 -0500
commit28b2e591b1f527cbaccccf4d80b5f71cb745e392 (patch)
treeb06b2a3d91746270274d5e121e761266c97fed0f /arch/arm/mach-imx/clk-imx6sx.c
parent82fa86e3b032f2b84945bd062e530283d4f7defe (diff)
ENGR00318063-5: ARM: imx: set CLK_SET_PARENT_GATE flag for glitchy mux clocks
The mux clocks found on imx6 SoCs are all glitchy ones except pll1_sw_clk_sel, axi_sel, periph_clk_sel and periph2_clk_sel. When switching parent clock of a glitchy mux without gating, a glitch could be generated and propagated into the downstream divider, and hence locks up the divider and results in no clock output. To avoid the situation, the parent switching should happen only when the clock is gated. Add CLK_SET_PARENT_GATE flag for i.MX mux clocks, so that clock core will make that check during clk_set_parent() call. Since glitchless clocks do not need this flag, we create imx_clk_mux_glitchless() without this flag for them. The periph_clk_sel and periph2_clk_sel are registered by imx_clk_busy_mux() which does not set this flag anyway, so they need no change. shawn.guo: cherry-pick commit 10bae51219b3 from imx_3.10.y Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Diffstat (limited to 'arch/arm/mach-imx/clk-imx6sx.c')
-rw-r--r--arch/arm/mach-imx/clk-imx6sx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/clk-imx6sx.c b/arch/arm/mach-imx/clk-imx6sx.c
index 7c1dbf1d58af..04f05d07fd4d 100644
--- a/arch/arm/mach-imx/clk-imx6sx.c
+++ b/arch/arm/mach-imx/clk-imx6sx.c
@@ -278,9 +278,9 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node)
/* name reg shift width parent_names num_parents */
clks[IMX6SX_CLK_STEP] = imx_clk_mux("step", base + 0xc, 8, 1, step_sels, ARRAY_SIZE(step_sels));
- clks[IMX6SX_CLK_PLL1_SW] = imx_clk_mux("pll1_sw", base + 0xc, 2, 1, pll1_sw_sels, ARRAY_SIZE(pll1_sw_sels));
+ clks[IMX6SX_CLK_PLL1_SW] = imx_clk_mux_glitchless("pll1_sw", base + 0xc, 2, 1, pll1_sw_sels, ARRAY_SIZE(pll1_sw_sels));
clks[IMX6SX_CLK_OCRAM_ALT_SEL] = imx_clk_mux("ocram_alt_sel", base + 0x14, 7, 1, ocram_alt_sels, ARRAY_SIZE(ocram_alt_sels));
- clks[IMX6SX_CLK_OCRAM_SEL] = imx_clk_mux("ocram_sel", base + 0x14, 6, 1, ocram_sels, ARRAY_SIZE(ocram_sels));
+ clks[IMX6SX_CLK_OCRAM_SEL] = imx_clk_mux_glitchless("ocram_sel", base + 0x14, 6, 1, ocram_sels, ARRAY_SIZE(ocram_sels));
clks[IMX6SX_CLK_PERIPH_PRE] = imx_clk_mux("periph_pre", base + 0x18, 18, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels));
clks[IMX6SX_CLK_PERIPH2_PRE] = imx_clk_mux("periph2_pre", base + 0x18, 21, 2, periph2_pre_sels, ARRAY_SIZE(periph2_pre_sels));
clks[IMX6SX_CLK_PERIPH_CLK2_SEL] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 2, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels));