mmc: msm_sdcc: Unconditionally send CMD52 after CMD53
Always send a dummy CMD52 after CMD53 for controllers
earlier than SDCC4
Signed-off-by: Oluwafemi Adeyemi <aadeyemi@codeaurora.org>
Conflicts:
arch/arm/configs/msm7627-perf_defconfig
arch/arm/configs/msm7627_defconfig
arch/arm/configs/qsd-chromeos-st1q-qrdc_defconfig
arch/arm/mach-msm/board-qrdc.c
chromeos/config/armel/config.flavour.chromeos-st1q-qrdc
diff --git a/arch/arm/configs/msm7627a-perf_defconfig b/arch/arm/configs/msm7627a-perf_defconfig
index b28f7de..e18dac4 100644
--- a/arch/arm/configs/msm7627a-perf_defconfig
+++ b/arch/arm/configs/msm7627a-perf_defconfig
@@ -271,7 +271,6 @@
CONFIG_MMC_MSM=y
CONFIG_MMC_MSM_SDIO_SUPPORT=y
CONFIG_MMC_MSM_CARD_HW_DETECTION=y
-CONFIG_MMC_MSM_SDC2_DUMMY52_REQUIRED=y
CONFIG_MMC_MSM_SDC3_SUPPORT=y
CONFIG_MMC_MSM_SDC3_8_BIT_SUPPORT=y
CONFIG_LEDS_MSM_PDM=y
diff --git a/arch/arm/configs/msm7627a_defconfig b/arch/arm/configs/msm7627a_defconfig
index d77611f..69b8f61 100644
--- a/arch/arm/configs/msm7627a_defconfig
+++ b/arch/arm/configs/msm7627a_defconfig
@@ -267,7 +267,6 @@
CONFIG_MMC_MSM=y
CONFIG_MMC_MSM_SDIO_SUPPORT=y
CONFIG_MMC_MSM_CARD_HW_DETECTION=y
-CONFIG_MMC_MSM_SDC2_DUMMY52_REQUIRED=y
CONFIG_MMC_MSM_SDC3_SUPPORT=y
CONFIG_MMC_MSM_SDC3_8_BIT_SUPPORT=y
CONFIG_LEDS_MSM_PDM=y
diff --git a/arch/arm/configs/msm7630-perf_defconfig b/arch/arm/configs/msm7630-perf_defconfig
index a1cd480..102b525 100644
--- a/arch/arm/configs/msm7630-perf_defconfig
+++ b/arch/arm/configs/msm7630-perf_defconfig
@@ -319,9 +319,7 @@
CONFIG_MMC_MSM_CARD_HW_DETECTION=y
# CONFIG_MMC_MSM_SDC1_SUPPORT is not set
CONFIG_MMC_MSM_SDC2_8_BIT_SUPPORT=y
-CONFIG_MMC_MSM_SDC2_DUMMY52_REQUIRED=y
CONFIG_MMC_MSM_SDC3_SUPPORT=y
-CONFIG_MMC_MSM_SDC3_DUMMY52_REQUIRED=y
CONFIG_MMC_MSM_SDC4_SUPPORT=y
# CONFIG_LEDS_MSM_PMIC is not set
CONFIG_LEDS_PMIC8058=y
diff --git a/arch/arm/configs/msm7630_defconfig b/arch/arm/configs/msm7630_defconfig
index 54f1a44..8463d9c 100644
--- a/arch/arm/configs/msm7630_defconfig
+++ b/arch/arm/configs/msm7630_defconfig
@@ -306,9 +306,7 @@
CONFIG_MMC_MSM_CARD_HW_DETECTION=y
# CONFIG_MMC_MSM_SDC1_SUPPORT is not set
CONFIG_MMC_MSM_SDC2_8_BIT_SUPPORT=y
-CONFIG_MMC_MSM_SDC2_DUMMY52_REQUIRED=y
CONFIG_MMC_MSM_SDC3_SUPPORT=y
-CONFIG_MMC_MSM_SDC3_DUMMY52_REQUIRED=y
CONFIG_MMC_MSM_SDC4_SUPPORT=y
CONFIG_SWITCH=y
CONFIG_SWITCH_GPIO=y
diff --git a/arch/arm/configs/msm8660-perf_defconfig b/arch/arm/configs/msm8660-perf_defconfig
index f745a92..14f39fc 100644
--- a/arch/arm/configs/msm8660-perf_defconfig
+++ b/arch/arm/configs/msm8660-perf_defconfig
@@ -372,13 +372,10 @@
CONFIG_MMC_MSM_CARD_HW_DETECTION=y
CONFIG_MMC_MSM_SDC1_8_BIT_SUPPORT=y
CONFIG_MMC_MSM_SDC2_8_BIT_SUPPORT=y
-CONFIG_MMC_MSM_SDC2_DUMMY52_REQUIRED=y
CONFIG_MMC_MSM_SDC3_SUPPORT=y
CONFIG_MMC_MSM_SDC3_8_BIT_SUPPORT=y
CONFIG_MMC_MSM_SDC4_SUPPORT=y
-CONFIG_MMC_MSM_SDC4_DUMMY52_REQUIRED=y
CONFIG_MMC_MSM_SDC5_SUPPORT=y
-CONFIG_MMC_MSM_SDC5_DUMMY52_REQUIRED=y
CONFIG_LEDS_GPIO=y
# CONFIG_LEDS_MSM_PMIC is not set
CONFIG_LEDS_PMIC8058=y
diff --git a/arch/arm/configs/msm8660_defconfig b/arch/arm/configs/msm8660_defconfig
index 4e11bce..c8943ef 100644
--- a/arch/arm/configs/msm8660_defconfig
+++ b/arch/arm/configs/msm8660_defconfig
@@ -359,13 +359,10 @@
CONFIG_MMC_MSM_CARD_HW_DETECTION=y
CONFIG_MMC_MSM_SDC1_8_BIT_SUPPORT=y
CONFIG_MMC_MSM_SDC2_8_BIT_SUPPORT=y
-CONFIG_MMC_MSM_SDC2_DUMMY52_REQUIRED=y
CONFIG_MMC_MSM_SDC3_SUPPORT=y
CONFIG_MMC_MSM_SDC3_8_BIT_SUPPORT=y
CONFIG_MMC_MSM_SDC4_SUPPORT=y
-CONFIG_MMC_MSM_SDC4_DUMMY52_REQUIRED=y
CONFIG_MMC_MSM_SDC5_SUPPORT=y
-CONFIG_MMC_MSM_SDC5_DUMMY52_REQUIRED=y
CONFIG_LEDS_GPIO=y
# CONFIG_LEDS_MSM_PMIC is not set
CONFIG_LEDS_PMIC8058=y
diff --git a/arch/arm/include/asm/mach/mmc.h b/arch/arm/include/asm/mach/mmc.h
index 4c2e970..4158f14 100644
--- a/arch/arm/include/asm/mach/mmc.h
+++ b/arch/arm/include/asm/mach/mmc.h
@@ -129,7 +129,6 @@
unsigned long irq_flags;
unsigned long mmc_bus_width;
int (*wpswitch) (struct device *);
- int dummy52_required;
unsigned int msmsdcc_fmin;
unsigned int msmsdcc_fmid;
unsigned int msmsdcc_fmax;
diff --git a/arch/arm/mach-msm/board-msm7x27.c b/arch/arm/mach-msm/board-msm7x27.c
index a8ddad7..0fda595 100644
--- a/arch/arm/mach-msm/board-msm7x27.c
+++ b/arch/arm/mach-msm/board-msm7x27.c
@@ -1661,9 +1661,6 @@
.msmsdcc_fmid = 24576000,
.msmsdcc_fmax = 49152000,
.nonremovable = 0,
-#ifdef CONFIG_MMC_MSM_SDC1_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
};
#endif
@@ -1679,9 +1676,6 @@
.msmsdcc_fmid = 24576000,
.msmsdcc_fmax = 49152000,
.nonremovable = 0,
-#ifdef CONFIG_MMC_MSM_SDC2_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
};
#endif
@@ -1694,9 +1688,6 @@
.msmsdcc_fmid = 24576000,
.msmsdcc_fmax = 49152000,
.nonremovable = 0,
-#ifdef CONFIG_MMC_MSM_SDC3_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
};
#endif
@@ -1709,9 +1700,6 @@
.msmsdcc_fmid = 24576000,
.msmsdcc_fmax = 49152000,
.nonremovable = 0,
-#ifdef CONFIG_MMC_MSM_SDC4_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
};
#endif
diff --git a/arch/arm/mach-msm/board-msm7x27a.c b/arch/arm/mach-msm/board-msm7x27a.c
index bfc9c09..f2c9243 100644
--- a/arch/arm/mach-msm/board-msm7x27a.c
+++ b/arch/arm/mach-msm/board-msm7x27a.c
@@ -1450,9 +1450,6 @@
.msmsdcc_fmin = 144000,
.msmsdcc_fmid = 24576000,
.msmsdcc_fmax = 49152000,
-#ifdef CONFIG_MMC_MSM_SDC2_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
};
#endif
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index af5b3c0..393504b 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -6239,9 +6239,6 @@
.mmc_bus_width = MMC_CAP_4_BIT_DATA,
.status = mbp_status,
.register_status_notify = mbp_register_status_notify,
-#ifdef CONFIG_MMC_MSM_SDC1_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
.msmsdcc_fmin = 144000,
.msmsdcc_fmid = 24576000,
.msmsdcc_fmax = 24576000,
@@ -6252,9 +6249,6 @@
.ocr_mask = MMC_VDD_165_195,
.translate_vdd = msm_sdcc_setup_power,
.mmc_bus_width = MMC_CAP_4_BIT_DATA,
-#ifdef CONFIG_MMC_MSM_SDC1_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
.msmsdcc_fmin = 144000,
.msmsdcc_fmid = 24576000,
.msmsdcc_fmax = 49152000,
@@ -6272,9 +6266,6 @@
#else
.mmc_bus_width = MMC_CAP_4_BIT_DATA,
#endif
-#ifdef CONFIG_MMC_MSM_SDC2_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
.msmsdcc_fmin = 144000,
.msmsdcc_fmid = 24576000,
.msmsdcc_fmax = 49152000,
@@ -6290,9 +6281,6 @@
#ifdef CONFIG_MMC_MSM_SDIO_SUPPORT
.sdiowakeup_irq = MSM_GPIO_TO_INT(118),
#endif
-#ifdef CONFIG_MMC_MSM_SDC3_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
.msmsdcc_fmin = 144000,
.msmsdcc_fmid = 24576000,
.msmsdcc_fmax = 49152000,
@@ -6311,9 +6299,6 @@
.irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
#endif
.wpswitch = msm_sdcc_get_wpswitch,
-#ifdef CONFIG_MMC_MSM_SDC4_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
.msmsdcc_fmin = 144000,
.msmsdcc_fmid = 24576000,
.msmsdcc_fmax = 49152000,
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c
index c06a1b9..f3e8136 100644
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ b/arch/arm/mach-msm/board-msm8x60.c
@@ -8330,9 +8330,6 @@
.msmsdcc_fmax = 48000000,
.nonremovable = 1,
.pclk_src_dfab = 1,
-#ifdef CONFIG_MMC_MSM_SDC1_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
};
#endif
@@ -8348,9 +8345,6 @@
.nonremovable = 0,
.pclk_src_dfab = 1,
.register_status_notify = sdc2_register_status_notify,
-#ifdef CONFIG_MMC_MSM_SDC2_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
#ifdef CONFIG_MSM_SDIO_AL
.is_sdio_al_client = 1,
#endif
@@ -8374,9 +8368,6 @@
.msmsdcc_fmax = 48000000,
.nonremovable = 0,
.pclk_src_dfab = 1,
-#ifdef CONFIG_MMC_MSM_SDC3_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
};
#endif
@@ -8391,9 +8382,6 @@
.nonremovable = 0,
.pclk_src_dfab = 1,
.cfg_mpm_sdiowakeup = msm_sdcc_cfg_mpm_sdiowakeup,
-#ifdef CONFIG_MMC_MSM_SDC4_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
};
#endif
@@ -8409,9 +8397,6 @@
.nonremovable = 0,
.pclk_src_dfab = 1,
.register_status_notify = sdc5_register_status_notify,
-#ifdef CONFIG_MMC_MSM_SDC5_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
#ifdef CONFIG_MSM_SDIO_AL
.is_sdio_al_client = 1,
#endif
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index e02ef45..dc42aad 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -2187,9 +2187,6 @@
.translate_vdd = msm_sdcc_setup_power,
.mmc_bus_width = MMC_CAP_4_BIT_DATA,
.wpswitch = msm_sdcc_get_wpswitch,
-#ifdef CONFIG_MMC_MSM_SDC1_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
.msmsdcc_fmin = 144000,
.msmsdcc_fmid = 25000000,
.msmsdcc_fmax = 49152000,
@@ -2203,9 +2200,6 @@
.translate_vdd = msm_sdcc_setup_power,
.mmc_bus_width = MMC_CAP_4_BIT_DATA,
.wpswitch = msm_sdcc_get_wpswitch,
-#ifdef CONFIG_MMC_MSM_SDC2_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
.msmsdcc_fmin = 144000,
.msmsdcc_fmid = 25000000,
.msmsdcc_fmax = 49152000,
@@ -2222,9 +2216,6 @@
#else
.mmc_bus_width = MMC_CAP_4_BIT_DATA,
#endif
-#ifdef CONFIG_MMC_MSM_SDC3_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
.msmsdcc_fmin = 144000,
.msmsdcc_fmid = 25000000,
.msmsdcc_fmax = 49152000,
@@ -2238,9 +2229,6 @@
.translate_vdd = msm_sdcc_setup_power,
.mmc_bus_width = MMC_CAP_4_BIT_DATA,
.wpswitch = msm_sdcc_get_wpswitch,
-#ifdef CONFIG_MMC_MSM_SDC4_DUMMY52_REQUIRED
- .dummy52_required = 1,
-#endif
.msmsdcc_fmin = 144000,
.msmsdcc_fmid = 25000000,
.msmsdcc_fmax = 49152000,
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 7378c62..7c85974 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -476,15 +476,6 @@
help
Select Y to enable 8bit support for Slot 1.
-config MMC_MSM_SDC1_DUMMY52_REQUIRED
- boolean "Send dummy 52 read for SDC1"
- depends on MMC_MSM_SDC1_SUPPORT
- default n
- help
- Select Y to enable sending dummy 52 reads to complete
- all data commands. Required for some SDIO cards.
- If unsure, say N.
-
config MMC_MSM_SDC2_SUPPORT
boolean "Qualcomm SDC2 support"
depends on MMC_MSM
@@ -499,15 +490,6 @@
help
Select Y to enable 8bit support for Slot 2.
-config MMC_MSM_SDC2_DUMMY52_REQUIRED
- boolean "Send dummy 52 read for SDC2"
- depends on MMC_MSM_SDC2_SUPPORT
- default n
- help
- Select Y to enable sending dummy 52 reads to complete
- all data commands. Required for some SDIO cards.
- If unsure, say N.
-
config MMC_MSM_SDC3_SUPPORT
boolean "Qualcomm SDC3 support"
depends on MMC_MSM
@@ -522,15 +504,6 @@
help
Select Y to enable 8bit support for Slot 3.
-config MMC_MSM_SDC3_DUMMY52_REQUIRED
- boolean "Send dummy 52 read for SDC3"
- depends on MMC_MSM_SDC3_SUPPORT
- default n
- help
- Select Y to enable sending dummy 52 reads to complete
- all data commands. Required for some SDIO cards.
- If unsure, say N.
-
config MMC_MSM_SDC4_SUPPORT
boolean "Qualcomm SDC4 support"
depends on MMC_MSM
@@ -545,15 +518,6 @@
help
Select Y to enable 8bit support for Slot 4.
-config MMC_MSM_SDC4_DUMMY52_REQUIRED
- boolean "Send dummy 52 read for SDC4"
- depends on MMC_MSM_SDC4_SUPPORT
- default n
- help
- Select Y to enable sending dummy 52 reads to complete
- all data commands. Required for some SDIO cards.
- If unsure, say N.
-
config MMC_MSM_SDC5_SUPPORT
boolean "Qualcomm SDC5 support"
depends on MMC_MSM
@@ -568,15 +532,6 @@
help
Select Y to enable 8bit support for Slot 5.
-config MMC_MSM_SDC5_DUMMY52_REQUIRED
- boolean "Send dummy 52 read for SDC5"
- depends on MMC_MSM_SDC5_SUPPORT
- default n
- help
- Select Y to enable sending dummy 52 reads to complete
- all data commands. Required for some SDIO cards.
- If unsure, say N.
-
config MMC_MSM_SPS_SUPPORT
bool "Use SPS BAM as data mover"
depends on MMC_MSM && SPS
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index 92a3a39..453c6a0 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -1519,7 +1519,7 @@
host->curr.mrq = mrq;
- if (host->plat->dummy52_required) {
+ if (!host->plat->sdcc_v4_sup) {
if (mrq->data && mrq->data->flags == MMC_DATA_WRITE) {
if (mrq->cmd->opcode == SD_IO_RW_EXTENDED ||
mrq->cmd->opcode == 54) {