X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=common%2Fcmd_mmc.c;h=dfc1ec850e20a939bcecf24c1d377da84d034fd7;hb=434afa809e91bbf67e003df8daf0e2f39c48ce59;hp=4e28c9d7a4d6541f0c1633ee494b77e476b5e776;hpb=e72d344386bf80738fab7a6bd37cb321f443093a;p=u-boot diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index 4e28c9d7a4..dfc1ec850e 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -7,6 +7,7 @@ #include #include +#include #include static int curr_device = -1; @@ -85,8 +86,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: ");