[patch v2 05/16] MMC: S3C24XX MMC/SD stop fix

Ben Dooks
2008-06-16T14:36:30Z

[-- Attachment #1: thirdparty/openmoko-mci/s3cmci-stop-fix.patch --]
[-- Type: text/plain, Size: 1223 bytes --]

From: Thomas Kleffel <tk@maintech.de>

Fix the request finalisation by ensuring the controller
is stopped.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Harald Welte <laforge@openmoko.org>

Index: linux-2.6.26-rc5-q2/drivers/mmc/host/s3cmci.c
===================================================================
--- linux-2.6.26-rc5-q2.orig/drivers/mmc/host/s3cmci.c 2008-06-16 15:24:52.000000000 +0100
+++ linux-2.6.26-rc5-q2/drivers/mmc/host/s3cmci.c 2008-06-16 15:24:55.000000000 +0100
@@ -667,7 +667,7 @@ static void finalize_request(struct s3cm
#endif
/* Cleanup controller */
writel(0, host->base + S3C2410_SDICMDARG);
- writel(0, host->base + S3C2410_SDIDCON);
+ writel(S3C2410_SDIDCON_STOP, host->base + S3C2410_SDIDCON);
writel(0, host->base + S3C2410_SDICMDCON);
writel(0, host->base + host->sdiimsk);

@@ -793,7 +793,7 @@ static int s3cmci_setup_data(struct s3cm
dbg(host, dbg_err,
"mci_setup_data() transfer stillin progress.\n");

- writel(0, host->base + S3C2410_SDIDCON);
+ writel(S3C2410_SDIDCON_STOP, host->base + S3C2410_SDIDCON);
s3cmci_reset(host);

if ((stoptries--) == 0) {