Skip to content
Snippets Groups Projects
Commit 70ac1697 authored by Peng Fan's avatar Peng Fan Committed by Stefano Babic
Browse files

imx: mx6: lcdif: gate clock before changing mux


The mux for the lcd clock is not glitchless,
so need to first gate the clock before changing the mux.

Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
parent 0e81982d
No related branches found
No related tags found
No related merge requests found
......@@ -771,6 +771,16 @@ int enable_lcdif_clock(u32 base_addr)
return 0;
}
/* Gate LCDIF clock first */
reg = readl(&imx_ccm->CCGR3);
reg &= ~lcdif_ccgr3_mask;
writel(reg, &imx_ccm->CCGR3);
reg = readl(&imx_ccm->CCGR2);
reg &= ~MXC_CCM_CCGR2_LCD_MASK;
writel(reg, &imx_ccm->CCGR2);
/* Select pre-mux */
reg = readl(&imx_ccm->cscdr2);
reg &= ~lcdif_clk_sel_mask;
writel(reg, &imx_ccm->cscdr2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment