msm: set the packed write feature in platform data for eMMC
Some device has problems in packed write for eMMC.
So we can set packed write feature in platform data.
Change-Id: I7e76c78fd076fa5cb0d540c1312fd6ae69aae1b4
diff --git a/arch/arm/include/asm/mach/mmc.h b/arch/arm/include/asm/mach/mmc.h
index 562f13c..de97ce7 100644
--- a/arch/arm/include/asm/mach/mmc.h
+++ b/arch/arm/include/asm/mach/mmc.h
@@ -144,6 +144,8 @@
unsigned int uhs_caps;
/* More capabilities */
unsigned int uhs_caps2;
+ /* Supported packed write */
+ unsigned int packed_write;
void (*sdio_lpm_gpio_setup)(struct device *, unsigned int);
unsigned int status_irq;
unsigned int status_gpio;
diff --git a/arch/arm/mach-msm/board-8064-storage.c b/arch/arm/mach-msm/board-8064-storage.c
index 13d8b3b..2a703ca 100644
--- a/arch/arm/mach-msm/board-8064-storage.c
+++ b/arch/arm/mach-msm/board-8064-storage.c
@@ -252,6 +252,7 @@
.vreg_data = &mmc_slot_vreg_data[SDCC1],
.uhs_caps = MMC_CAP_1_8V_DDR | MMC_CAP_UHS_DDR50,
.uhs_caps2 = MMC_CAP2_HS200_1_8V_SDR,
+ .packed_write = MMC_CAP2_PACKED_WR | MMC_CAP2_PACKED_WR_CONTROL;
.mpm_sdiowakeup_int = MSM_MPM_PIN_SDC1_DAT1,
.msm_bus_voting_data = &sps_to_ddr_bus_voting_data,
};
diff --git a/arch/arm/mach-msm/board-8930-storage.c b/arch/arm/mach-msm/board-8930-storage.c
index 7280b22..3c58b6b 100644
--- a/arch/arm/mach-msm/board-8930-storage.c
+++ b/arch/arm/mach-msm/board-8930-storage.c
@@ -247,6 +247,7 @@
.mpm_sdiowakeup_int = MSM_MPM_PIN_SDC1_DAT1,
.msm_bus_voting_data = &sps_to_ddr_bus_voting_data,
.uhs_caps2 = MMC_CAP2_HS200_1_8V_SDR,
+ .packed_write = MMC_CAP2_PACKED_WR | MMC_CAP2_PACKED_WR_CONTROL;
};
#endif
diff --git a/arch/arm/mach-msm/board-8960-storage.c b/arch/arm/mach-msm/board-8960-storage.c
index 67f44aa..31d1c72 100644
--- a/arch/arm/mach-msm/board-8960-storage.c
+++ b/arch/arm/mach-msm/board-8960-storage.c
@@ -296,6 +296,7 @@
.mpm_sdiowakeup_int = MSM_MPM_PIN_SDC1_DAT1,
.msm_bus_voting_data = &sps_to_ddr_bus_voting_data,
.uhs_caps2 = MMC_CAP2_HS200_1_8V_SDR,
+ .packed_write = MMC_CAP2_PACKED_WR | MMC_CAP2_PACKED_WR_CONTROL;
};
#endif
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index a4af6c9..15c8bd5 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -5179,8 +5179,9 @@
mmc->caps |= (MMC_CAP_SET_XPC_330 | MMC_CAP_SET_XPC_300 |
MMC_CAP_SET_XPC_180);
- mmc->caps2 |= MMC_CAP2_PACKED_WR;
- mmc->caps2 |= MMC_CAP2_PACKED_WR_CONTROL;
+ /* packed write */
+ mmc->caps2 |= plat->packed_write;
+
mmc->caps2 |= (MMC_CAP2_BOOTPART_NOACC | MMC_CAP2_DETECT_ON_ERR);
mmc->caps2 |= MMC_CAP2_SANITIZE;