From patchwork Mon Sep 28 16:39:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 50422 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8SGdECU009781 for ; Mon, 28 Sep 2009 16:39:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752773AbZI1QjJ (ORCPT ); Mon, 28 Sep 2009 12:39:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752747AbZI1QjJ (ORCPT ); Mon, 28 Sep 2009 12:39:09 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:54649 "EHLO mho-02-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752744AbZI1QjI (ORCPT ); Mon, 28 Sep 2009 12:39:08 -0400 Received: from muru.com ([72.249.23.125] helo=localhost.localdomain) by mho-02-ewr.mailhop.org with esmtpa (Exim 4.68) (envelope-from ) id 1MsJFo-0009w6-1p; Mon, 28 Sep 2009 16:39:12 +0000 Received: from Mutt by mutt-smtp-wrapper.pl 1.2 (www.zdo.com/articles/mutt-smtp-wrapper.shtml) X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 72.249.23.125 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19viDLt10xc0NCa/1g1THb+ Date: Mon, 28 Sep 2009 09:39:08 -0700 From: Tony Lindgren To: linux-arm-kernel@lists.infradead.org Cc: linux-omap@vger.kernel.org Subject: Re: [PATCH 13/12] omap: Fix wrong condition check in while loop for mailbox and iommu2 Message-ID: <20090928163908.GD18957@atomide.com> References: <20090924233027.6065.95725.stgit@localhost> <20090928162657.GC18957@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090928162657.GC18957@atomide.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org * Tony Lindgren [090928 09:28]: > Here's one more fix for this series. Correction, there were two patches, one for mailbox and one for iommu2 with the same fix. Here are both of them merged into a single patch. Tony From 055c49d285a151ccb91d63bac6d8621be3db5c93 Mon Sep 17 00:00:00 2001 From: Hiroshi DOYU Date: Mon, 28 Sep 2009 09:21:26 -0700 Subject: [PATCH] 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: Juha Leppanen Signed-off-by: Hiroshi DOYU Signed-off-by: Juha Leppanen Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index 2d9b5cc..4a0e1cd 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c @@ -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"); diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index f3fefca..c035ad3 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c @@ -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");