summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarnali Sarkar <barnali.sarkar@intel.com>2017-12-27 13:51:18 +0530
committerSubrata Banik <subrata.banik@intel.com>2018-02-07 01:48:24 +0000
commite9628402820b88543443529fae87106f74689aa7 (patch)
treea4455d1ddef5b5778fed16c5ed4b4a2868c50493
parentf43adf0b894e916f0403761ecb9147d7061b0619 (diff)
storage: Fix CMD13 failure issue
This patch stores the correct capabilities for EMMC media which in turn sets the correct timing data for HS400 mode. Without this code change, EMMC CMD13 is failing at the end of HS400 mode switching. BUG=none BRANCH=none TEST=Build and boot Soraka Change-Id: I3f00c9eace7cc136d86a1e07f040fbfc09e0e02e Signed-off-by: Barnali Sarkar <barnali.sarkar@intel.com> Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/23541 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
-rw-r--r--src/commonlib/storage/mmc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/commonlib/storage/mmc.c b/src/commonlib/storage/mmc.c
index ad7861704f..ca067054e0 100644
--- a/src/commonlib/storage/mmc.c
+++ b/src/commonlib/storage/mmc.c
@@ -338,6 +338,10 @@ int mmc_change_freq(struct storage_media *media)
if (err)
return err;
+ /* Determine if the device supports enhanced strobe */
+ media->caps |= ext_csd[EXT_CSD_STROBE_SUPPORT]
+ ? DRVR_CAP_ENHANCED_STROBE : 0;
+
if ((ctrlr->caps & DRVR_CAP_HS400) &&
(ext_csd[EXT_CSD_CARD_TYPE] & MMC_HS400))
err = mmc_select_hs400(media);
@@ -419,10 +423,6 @@ int mmc_update_capacity(struct storage_media *media)
if (ext_csd[EXT_CSD_REV] < 2)
return 0;
- /* Determine if the device supports enhanced strobe */
- media->caps |= ext_csd[EXT_CSD_STROBE_SUPPORT]
- ? DRVR_CAP_ENHANCED_STROBE : 0;
-
/* Determine the eMMC device information */
media->partition_config = ext_csd[EXT_CSD_PART_CONF]
& EXT_CSD_PART_ACCESS_MASK;