Skip to content

Commit

Permalink
omap: Fix wrong condition check in while loop for mailbox and iommu2
Browse files Browse the repository at this point in the history
It's worked fine so far since reset is done for the first time.

Reported-by: Juha Leppanen <juha_motorsportcom@luukku.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Juha Leppanen <juha_motorsportcom@luukku.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Hiroshi DOYU authored and Tony Lindgren committed Sep 28, 2009
1 parent 0fd92a1 commit 055c49d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/iommu2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 055c49d

Please sign in to comment.