Skip to content
Permalink
Browse files

mmc: Allow forward compatibility for eMMC

commit 03a59437ef6b6ad7fb0165cb9b96c08d6bf057fc upstream.

Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information...
romain-izard-pro authored and hmz007 committed Jun 27, 2014
1 parent 14893b2 commit c4f890b76eaaf26093fdf6dacfb093ebb23bb0b3
Showing with 5 additions and 6 deletions.
  1. +5 −6 drivers/mmc/core/mmc.c
@@ -291,13 +291,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];

0 comments on commit c4f890b

Please sign in to comment.
You can’t perform that action at this time.