mmc: msm sdcc: Enabling the "Cache Ctrl" feautre
Cache is a temporary storage space in eMMC device.
The cache should in typical case reduce the access time (compared to an
access to the main non-volatile storage)
for both write and read. The cache is not directly accessible by the
host. Data in the cache may (and most probably will) be lost due to a
sudden power down. If there was a flush operation ongoing when the
power was lost then also any such data may be lost.
Turning the cache OFF shall trigger flushing of the data to the
non-volatile storage.
Change-Id: I7fb809024121cbd277fca9560d023c4ee07fe433
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index a86798d..87dbd8b 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -5735,6 +5735,7 @@
mmc->caps2 |= MMC_CAP2_PACKED_WR_CONTROL;
mmc->caps2 |= (MMC_CAP2_BOOTPART_NOACC | MMC_CAP2_DETECT_ON_ERR);
mmc->caps2 |= MMC_CAP2_SANITIZE;
+ mmc->caps2 |= MMC_CAP2_CACHE_CTRL;
if (plat->nonremovable)
mmc->caps |= MMC_CAP_NONREMOVABLE;