提交 abaf5c98 编写于 作者: R Rasmus Villemoes 提交者: Stefano Babic

arm: mxs: be more careful when enabling gpmi_clk

The data sheet says that the DIV field cannot change while the CLKGATE
bit is set or modified. So do it a little more carefully, by first
clearing the bit, waiting for that to appear, then setting the DIV
field.
Signed-off-by: NRasmus Villemoes <rasmus.villemoes@prevas.dk>
上级 fb946252
......@@ -103,8 +103,11 @@ int arch_cpu_init(void)
&clkctrl_regs->hw_clkctrl_clkseq_set);
/* Set GPMI clock to ref_xtal / 1 */
clrbits_le32(&clkctrl_regs->hw_clkctrl_gpmi, CLKCTRL_GPMI_CLKGATE);
while (readl(&clkctrl_regs->hw_clkctrl_gpmi) & CLKCTRL_GPMI_CLKGATE)
;
clrsetbits_le32(&clkctrl_regs->hw_clkctrl_gpmi,
CLKCTRL_GPMI_CLKGATE | CLKCTRL_GPMI_DIV_MASK, 1);
CLKCTRL_GPMI_DIV_MASK, 1);
udelay(1000);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册