提交 055c49d2 编写于 作者: H Hiroshi DOYU 提交者: Tony Lindgren

omap: Fix wrong condition check in while loop for mailbox and iommu2

It's worked fine so far since reset is done for the first time.
Reported-by: NJuha Leppanen <juha_motorsportcom@luukku.com>
Signed-off-by: NHiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: NJuha Leppanen <juha_motorsportcom@luukku.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 0fd92a15
......@@ -79,7 +79,7 @@ static int omap2_iommu_enable(struct iommu *obj)
l = iommu_read_reg(obj, MMU_SYSSTATUS);
if (l & MMU_SYS_RESETDONE)
break;
} while (time_after(jiffies, timeout));
} while (!time_after(jiffies, timeout));
if (!(l & MMU_SYS_RESETDONE)) {
dev_err(obj->dev, "can't take mmu out of reset\n");
......
......@@ -93,7 +93,7 @@ static int omap2_mbox_startup(struct omap_mbox *mbox)
l = mbox_read_reg(MAILBOX_SYSSTATUS);
if (l & RESETDONE)
break;
} while (time_after(jiffies, timeout));
} while (!time_after(jiffies, timeout));
if (!(l & RESETDONE)) {
pr_err("Can't take mmu out of reset\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册