diff options
author | Romain Izard <romain.izard.pro@gmail.com> | 2014-06-27 10:51:07 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2014-12-03 13:40:14 +0100 |
commit | 90d87d3ac4688e3b2f2be55c21964a24e0163707 (patch) | |
tree | 7b9d5c251f0e541ab27300c8ea798c698f7f619d | |
parent | 9b6617c43241f6f7a3b45de6df23625d254c6b52 (diff) |
mmc: Allow forward compatibility for eMMC
As stated by the eMMC 5.0 specification, a chip should not be rejected
only because of the revision stated in the EXT_CSD_REV field of the
EXT_CSD register.
Remove the control on this value, the control of the CSD_STRUCTURE field
should be sufficient to reject future incompatible changes.
Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 03a59437ef6b6ad7fb0165cb9b96c08d6bf057fc)
-rw-r--r-- | drivers/mmc/core/mmc.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index e60f8cdf9fb5..2b73811d1452 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -292,13 +292,12 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) } } + /* + * The EXT_CSD format is meant to be forward compatible. As long + * as CSD_STRUCTURE does not change, all values for EXT_CSD_REV + * are authorized, see JEDEC JESD84-B50 section B.8. + */ card->ext_csd.rev = ext_csd[EXT_CSD_REV]; - if (card->ext_csd.rev > 7) { - pr_err("%s: unrecognised EXT_CSD revision %d\n", - mmc_hostname(card->host), card->ext_csd.rev); - err = -EINVAL; - goto out; - } card->ext_csd.raw_sectors[0] = ext_csd[EXT_CSD_SEC_CNT + 0]; card->ext_csd.raw_sectors[1] = ext_csd[EXT_CSD_SEC_CNT + 1]; |