提交 a5f35d63 编写于 作者: B Bo Shen 提交者: Tom Rini

ARM: atmel: spl: make initialization more stable

We need to make sure the main clock ready field in MCFR is set
after switch to main crystal oscillator.
Signed-off-by: NBo Shen <voice.shen@atmel.com>
Signed-off-by: NAndreas Bießmann <andreas.devel@googlemail.com>
上级 59158ba3
......@@ -50,6 +50,10 @@ static void switch_to_main_crystal_osc(void)
while (!(readl(&pmc->sr) & AT91_PMC_IXR_MOSCSELS))
;
/* Wait until MAINRDY field is set to make sure main clock is stable */
while (!(readl(&pmc->mcfr) & AT91_PMC_MAINRDY))
;
tmp = readl(&pmc->mor);
tmp &= ~AT91_PMC_MOR_MOSCRCEN;
tmp &= ~AT91_PMC_MOR_KEY(0xff);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册