Skip to content

Commit d07e73e

Browse files
Windrow14xiaoxiang781216
authored andcommitted
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>
1 parent 49cbcfb commit d07e73e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

drivers/mmcsd/mmcsd_sdio.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4084,6 +4084,24 @@ static void mmcsd_hwuninitialize(FAR struct mmcsd_state_s *priv)
40844084
SDIO_RESET(priv->dev);
40854085
}
40864086

4087+
static const char *mmc_get_mode_name(uint8_t mode)
4088+
{
4089+
switch (mode)
4090+
{
4091+
case EXT_CSD_HS_TIMING_BC:
4092+
return "backwards compatibility";
4093+
case EXT_CSD_HS_TIMING_HS:
4094+
return "high speed";
4095+
case EXT_CSD_HS_TIMING_HS200:
4096+
return "HS200";
4097+
case EXT_CSD_HS_TIMING_HS400:
4098+
return "HS400";
4099+
default:
4100+
ferr("Unknown mode: %u\n", mode);
4101+
return "Unknown";
4102+
}
4103+
}
4104+
40874105
/****************************************************************************
40884106
* Public Functions
40894107
****************************************************************************/
@@ -4187,6 +4205,11 @@ int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev)
41874205
mmcsd_initialize_procfs();
41884206
#endif
41894207

4208+
finfo("MMC: %s %" PRIu64 "KB %s %s mode\n", devname,
4209+
((uint64_t)priv->nblocks << priv->blockshift) >> 10,
4210+
priv->widebus ? "4-bits" : "1-bit",
4211+
mmc_get_mode_name(priv->mode));
4212+
41904213
return OK;
41914214

41924215
errout_with_hwinit:

0 commit comments

Comments
 (0)