From patchwork Fri Aug 26 09:28:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Girish K S X-Patchwork-Id: 3715 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5CBB823E54 for ; Fri, 26 Aug 2011 09:28:51 +0000 (UTC) Received: from mail-gw0-f52.google.com (mail-gw0-f52.google.com [74.125.83.52]) by fiordland.canonical.com (Postfix) with ESMTP id 2464FA18266 for ; Fri, 26 Aug 2011 09:28:51 +0000 (UTC) Received: by gwj15 with SMTP id 15so3703614gwj.11 for ; Fri, 26 Aug 2011 02:28:50 -0700 (PDT) Received: by 10.150.229.16 with SMTP id b16mr2161250ybh.155.1314350930503; Fri, 26 Aug 2011 02:28:50 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.151.27.20 with SMTP id e20cs275990ybj; Fri, 26 Aug 2011 02:28:49 -0700 (PDT) Received: by 10.42.131.197 with SMTP id a5mr788722ict.332.1314350928032; Fri, 26 Aug 2011 02:28:48 -0700 (PDT) Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com [209.85.210.45]) by mx.google.com with ESMTPS id h2si803198pbd.80.2011.08.26.02.28.47 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 26 Aug 2011 02:28:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.45 is neither permitted nor denied by best guess record for domain of girish.shivananjappa@linaro.org) client-ip=209.85.210.45; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.45 is neither permitted nor denied by best guess record for domain of girish.shivananjappa@linaro.org) smtp.mail=girish.shivananjappa@linaro.org Received: by pzk33 with SMTP id 33so5420470pzk.32 for ; Fri, 26 Aug 2011 02:28:47 -0700 (PDT) Received: by 10.142.238.13 with SMTP id l13mr486210wfh.31.1314350912330; Fri, 26 Aug 2011 02:28:32 -0700 (PDT) Received: from girishks ([115.113.119.130]) by mx.google.com with ESMTPS id b12sm446777wfe.0.2011.08.26.02.28.29 (version=SSLv3 cipher=OTHER); Fri, 26 Aug 2011 02:28:31 -0700 (PDT) From: Girish K S To: linux-mmc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, cjb@laptop.org, ben-linux@fluff.org, kgene.kim@samsung.com, patches@linaro.org, linux-samsung-soc@vger.kernel.org, Girish K S Subject: [PATCH] mmc: sdhci-s3c: Fix mmc card I/O problem Date: Fri, 26 Aug 2011 14:58:18 +0530 Message-Id: <1314350898-26372-1-git-send-email-girish.shivananjappa@linaro.org> X-Mailer: git-send-email 1.7.1 This patch fixes the problem in sdhci-s3c host driver for Samsung Soc's. During the card identification stage the mmc core driver enumerates for the best bus width in combination with the highest available data rate. It starts enumerating from the highest bus width (8) to lowest bus width (1). In case of few MMC cards the 4-bit bus enumeration fails and tries the 1-bit bus enumeration. When switched to 1-bit bus mode the host driver has to clear the previous bus width setting and apply the new setting. The current patch will clear the previous bus mode and apply the new mode setting. Signed-off-by: Girish K S Acked-by: Jaehoon Chung --- drivers/mmc/host/sdhci-s3c.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 2bd7bf4..fe886d6 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -302,6 +302,8 @@ static int sdhci_s3c_platform_8bit_width(struct sdhci_host *host, int width) ctrl &= ~SDHCI_CTRL_8BITBUS; break; default: + ctrl &= ~SDHCI_CTRL_4BITBUS; + ctrl &= ~SDHCI_CTRL_8BITBUS; break; }