aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/mmc.c
diff options
context:
space:
mode:
authorSamsung OSRC <osrc@samsung.com>2013-01-08 23:54:22 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-10-26 15:46:56 +0200
commit54b1a74db42faa0e1e3224f47107132e875a9aa5 (patch)
tree5908ac4e63324084421acddd686a4394e3f0fa63 /drivers/mmc/core/mmc.c
parent8b28321e779c61ef1586a5e42a7b6d40c907abf4 (diff)
downloadkernel_i9300_mainline-master.zip
kernel_i9300_mainline-master.tar.gz
kernel_i9300_mainline-master.tar.bz2
mmc: Soft-patch MoviNAND VTU00M (16GB) eMMC failureHEADmaster
Signed-off-by: Andrei F <luxneb@gmail.com>
Diffstat (limited to 'drivers/mmc/core/mmc.c')
-rw-r--r--drivers/mmc/core/mmc.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index f2d185c..0d4631c 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -19,6 +19,7 @@
#include <linux/mmc/host.h>
#include <linux/mmc/card.h>
#include <linux/mmc/mmc.h>
+#include <linux/string.h>
#include "core.h"
#include "host.h"
@@ -1973,6 +1974,15 @@ static int _mmc_resume(struct mmc_host *host)
mmc_power_up(host, host->card->ocr);
err = mmc_init_card(host, host->card->ocr, host->card);
+
+ if (host->card->movi_ops == 0x2) {
+ err = mmc_start_movi_operation(host->card);
+ if (err) {
+ pr_warning("%s: movi operation is failed\n",
+ mmc_hostname(host));
+ }
+ }
+
mmc_card_clr_suspended(host->card);
out:
@@ -2145,6 +2155,20 @@ int mmc_attach_mmc(struct mmc_host *host)
goto remove_card;
mmc_claim_host(host);
+ if (!strncmp(host->card->cid.prod_name, "VTU00M", 6) &&
+ (host->card->cid.prv == 0xf1) &&
+ (mmc_start_movi_smart(host->card) == 0x2))
+ host->card->movi_ops = 0x2;
+
+ if (host->card->movi_ops == 0x2) {
+ err = mmc_start_movi_operation(host->card);
+ if (err) {
+ pr_warning("%s: movi operation is failed\n",
+ mmc_hostname(host));
+ goto remove_card;
+ }
+ }
+
return 0;
remove_card: