8064: mmc: Disable CMD23 support for virtio

To enable CMD23, the controller must send AUTO_PROG_DONE status for
multi block write command CMD25.  The SDCC controller on Virtio doesn't
send this AUTO_PROG_DONE status. As a temporary workaround disable CMD23
only on virtio platforms.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
diff --git a/arch/arm/include/asm/mach/mmc.h b/arch/arm/include/asm/mach/mmc.h
index c150a63..f138df1 100644
--- a/arch/arm/include/asm/mach/mmc.h
+++ b/arch/arm/include/asm/mach/mmc.h
@@ -145,6 +145,7 @@
 	struct msm_mmc_pin_data *pin_data;
 	bool disable_bam;
 	bool disable_runtime_pm;
+	bool disable_cmd23;
 };
 
 #endif
diff --git a/arch/arm/mach-msm/board-apq8064.c b/arch/arm/mach-msm/board-apq8064.c
index f6932ba..37f47be 100644
--- a/arch/arm/mach-msm/board-apq8064.c
+++ b/arch/arm/mach-msm/board-apq8064.c
@@ -250,10 +250,12 @@
 		if (apq8064_sdc1_pdata) {
 			apq8064_sdc1_pdata->disable_bam = true;
 			apq8064_sdc1_pdata->disable_runtime_pm = true;
+			apq8064_sdc1_pdata->disable_cmd23 = true;
 		}
 		if (apq8064_sdc3_pdata) {
 			apq8064_sdc3_pdata->disable_bam = true;
 			apq8064_sdc3_pdata->disable_runtime_pm = true;
+			apq8064_sdc3_pdata->disable_cmd23 = true;
 		}
 	}
 	apq8064_add_sdcc(1, apq8064_sdc1_pdata);
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index b980377..aed3f64 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -3624,7 +3624,7 @@
 	 * status is to use the AUTO_PROG_DONE status provided by SDCC4
 	 * controller. So let's enable the CMD23 for SDCC4 only.
 	 */
-	if (host->plat->sdcc_v4_sup)
+	if (!plat->disable_cmd23 && host->plat->sdcc_v4_sup)
 		mmc->caps |= MMC_CAP_CMD23;
 
 	mmc->caps |= plat->uhs_caps;