From patchwork Wed Sep 15 23:58:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Madhusudhan X-Patchwork-Id: 184162 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8FNwOFl026214 for ; Wed, 15 Sep 2010 23:58:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754954Ab0IOX6X (ORCPT ); Wed, 15 Sep 2010 19:58:23 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:57596 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752627Ab0IOX6X (ORCPT ); Wed, 15 Sep 2010 19:58:23 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o8FNwEeC012120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 15 Sep 2010 18:58:14 -0500 Received: from webmail.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o8FNw928015064; Wed, 15 Sep 2010 18:58:10 -0500 (CDT) Received: from 192.168.10.89 (proxying for 128.247.79.84) (SquirrelMail authenticated user x0070977); by dbdmail.itg.ti.com with HTTP; Thu, 16 Sep 2010 05:28:11 +0530 (IST) Message-ID: <51627.192.168.10.89.1284595091.squirrel@dbdmail.itg.ti.com> Date: Thu, 16 Sep 2010 05:28:11 +0530 (IST) Subject: [PATCH] OMAP4: HSMMC cmd line reset change From: "Madhusudhan Chikkature" To: cjb@laptop.org Cc: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, santosh.shilimkar@ti.com User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 15 Sep 2010 23:58:25 +0000 (UTC) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 4526d27..750ba7d 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -976,12 +976,19 @@ static inline void omap_hsmmc_reset_controller_fsm(struct omap_hsmmc_host *host, unsigned long bit) { unsigned long i = 0; + unsigned long j = 0; unsigned long limit = (loops_per_jiffy * msecs_to_jiffies(MMC_TIMEOUT_MS)); OMAP_HSMMC_WRITE(host->base, SYSCTL, OMAP_HSMMC_READ(host->base, SYSCTL) | bit); + if (cpu_is_omap44xx() && bit == SRC) { + while ((!(OMAP_HSMMC_READ(host->base, SYSCTL) & bit)) + && (j++ < limit)) + cpu_relax(); + } + while ((OMAP_HSMMC_READ(host->base, SYSCTL) & bit) && (i++ < limit))