1
0
Fork 0
forked from nuttx/nuttx-update

drivers/mmcsd/mmcsd_sdio.c: show eMMC information after initialization is completed

Prompts for capacity, speed mode and bus width after eMMC
initialization is completed.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
This commit is contained in:
Windrow14 2024-08-19 11:26:14 +08:00 committed by Xiang Xiao
parent 49cbcfb5e6
commit d07e73e684

View file

@ -4084,6 +4084,24 @@ static void mmcsd_hwuninitialize(FAR struct mmcsd_state_s *priv)
SDIO_RESET(priv->dev);
}
static const char *mmc_get_mode_name(uint8_t mode)
{
switch (mode)
{
case EXT_CSD_HS_TIMING_BC:
return "backwards compatibility";
case EXT_CSD_HS_TIMING_HS:
return "high speed";
case EXT_CSD_HS_TIMING_HS200:
return "HS200";
case EXT_CSD_HS_TIMING_HS400:
return "HS400";
default:
ferr("Unknown mode: %u\n", mode);
return "Unknown";
}
}
/****************************************************************************
* Public Functions
****************************************************************************/
@ -4187,6 +4205,11 @@ int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev)
mmcsd_initialize_procfs();
#endif
finfo("MMC: %s %" PRIu64 "KB %s %s mode\n", devname,
((uint64_t)priv->nblocks << priv->blockshift) >> 10,
priv->widebus ? "4-bits" : "1-bit",
mmc_get_mode_name(priv->mode));
return OK;
errout_with_hwinit: