提交 b730ff3f 编写于 作者: X xypron.glpk@gmx.de 提交者: Tom Rini

omap3: incorrect logical check in do_emif4_init

((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x01)
is always false.
This does not match the comment
/*Wait till that bit clears*/

The problem was indicated by cppcheck.

I do not have the hardware to test if the code change below
leads to a correct system behavior.
Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: NSimon Glass <sjg@chromium.org>
上级 da0227f7
......@@ -76,7 +76,7 @@ static void do_emif4_init(void)
regval |= (1<<10);
writel(regval, &emif4_base->sdram_iodft_tlgc);
/*Wait till that bit clears*/
while ((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x1);
while ((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) != 0x0);
/*Re-verify the DDR PHY status*/
while ((readl(&emif4_base->sdram_sts) & (1<<2)) == 0x0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册