summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorPantelis Antoniou <pantelis.antoniou@konsulko.com>2015-01-23 12:12:01 +0200
committerPantelis Antoniou <pantelis.antoniou@konsulko.com>2015-02-23 19:34:29 +0200
commit4b7cee533630202095748ecb396bd9eacf47ff3f (patch)
tree00c86c2dcc3e72286fdece81acf823b0e3e60205 /common
parent46414296953410706e917cef9238926084e83a4b (diff)
downloadu-boot-imx-4b7cee533630202095748ecb396bd9eacf47ff3f.zip
u-boot-imx-4b7cee533630202095748ecb396bd9eacf47ff3f.tar.gz
u-boot-imx-4b7cee533630202095748ecb396bd9eacf47ff3f.tar.bz2
mmc: Implement SD/MMC versioning properly
The SD/MMC version scheme was buggy when dealing with standard major.minor.change cases. Fix it by using something similar to the linux's kernel versioning method. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Tested-by: Jaehoon Chung <jh80.chung@samsung.com> Reported-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_mmc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 4e28c9d..1335e3d 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -85,8 +85,12 @@ static void print_mmcinfo(struct mmc *mmc)
printf("Tran Speed: %d\n", mmc->tran_speed);
printf("Rd Block Len: %d\n", mmc->read_bl_len);
- printf("%s version %d.%d\n", IS_SD(mmc) ? "SD" : "MMC",
- (mmc->version >> 8) & 0xf, mmc->version & 0xff);
+ printf("%s version %d.%d", IS_SD(mmc) ? "SD" : "MMC",
+ EXTRACT_SDMMC_MAJOR_VERSION(mmc->version),
+ EXTRACT_SDMMC_MINOR_VERSION(mmc->version));
+ if (EXTRACT_SDMMC_CHANGE_VERSION(mmc->version) != 0)
+ printf(".%d", EXTRACT_SDMMC_CHANGE_VERSION(mmc->version));
+ printf("\n");
printf("High Capacity: %s\n", mmc->high_capacity ? "Yes" : "No");
puts("Capacity: ");