Thread (2 messages) 2 messages, 2 authors, 2011-08-26
STALE5414d

[PATCH] mmc: sdhci-s3c: Fix mmc card I/O problem

From: Girish K S <hidden>
Date: 2011-08-26 09:28:18
Also in: linux-mmc, linux-samsung-soc
Subsystem: multimedia card (mmc), secure digital (sd) and sdio subsystem, secure digital host controller interface (sdhci) driver, secure digital host controller interface (sdhci) samsung driver, the rest · Maintainers: Ulf Hansson, Adrian Hunter, Ben Dooks, Jaehoon Chung, Linus Torvalds

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 <redacted>
---
 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;
 	}
 
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help