[PATCH] cmd: mmc: Print life time info
Jaehoon Chung
jh80.chung at samsung.com
Wed Nov 2 23:49:07 CET 2022
Hi,
On 11/2/22 23:17, Robert Krikke wrote:
> Added life time info:
> -EXT_CSD_PRE_EOL_INFO
> -EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A
> -EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B
I'm not sure that it really needs to display this information as mmc info.
I hope that mmc info command should be displayed essential information.
>
> Signed-off-by: Robert Krikke <robertkrikke at gmail.com>
> Reviewed-by: Harm Berntsen <harm.berntsen at nedap.com>
> ---
> cmd/mmc.c | 6 ++++++
> include/mmc.h | 3 +++
> 2 files changed, 9 insertions(+)
>
> diff --git a/cmd/mmc.c b/cmd/mmc.c
> index 7bd4cd9e016..b940e320295 100644
> --- a/cmd/mmc.c
> +++ b/cmd/mmc.c
> @@ -127,6 +127,12 @@ static void print_mmcinfo(struct mmc *mmc)
> }
> wp >>= 2;
> }
> +
> + if (mmc->version >= MMC_VERSION_5_0) {
Move to outside of MMC_VERSION_4_41 if statement.
> + printf("Pre EOL Information: 0x%02X\n", ext_csd[EXT_CSD_PRE_EOL_INFO]);
> + printf("Life Time Estimation A: 0x%02X\n", ext_csd[EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]);
> + printf("Life Time Estimation B: 0x%02X\n", ext_csd[EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]);
It's not a readable value. If didn't check the eMMC5.0 spec, it's difficult to know what means 0x01, 0x02..etc..
Best Regards,
Jaehoon Chung
> + }
> }
> }
>
> diff --git a/include/mmc.h b/include/mmc.h
> index f519d869725..d0c3e684595 100644
> --- a/include/mmc.h
> +++ b/include/mmc.h
> @@ -242,6 +242,9 @@ static inline bool mmc_is_tuning_cmd(uint cmdidx)
> #define EXT_CSD_HC_ERASE_GRP_SIZE 224 /* RO */
> #define EXT_CSD_BOOT_MULT 226 /* RO */
> #define EXT_CSD_GENERIC_CMD6_TIME 248 /* RO */
> +#define EXT_CSD_PRE_EOL_INFO 267 /* RO */
> +#define EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A 268 /* RO */
> +#define EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B 269 /* RO */
> #define EXT_CSD_BKOPS_SUPPORT 502 /* RO */
>
> /*
More information about the U-Boot
mailing list