Comment 1 for bug 655461

Revision history for this message
Shawn Guo (shawnguo) wrote :

This may not be a real bug. There are two U_BOOT_CMD(mmc) definitions in common\cmd_mmc.c depending on CONFIG_GENERIC_MMC.

#ifndef CONFIG_GENERIC_MMC
U_BOOT_CMD(
        mmc, 3, 1, do_mmc,
        "MMC sub-system",
        "init [dev] - init MMC sub system\n"
        "mmc device [dev] - show or set current device"
);
#else /* !CONFIG_GENERIC_MMC */
U_BOOT_CMD(
        mmc, 6, 1, do_mmcops,
        "MMC sub system",
        "read <device num> addr blk# cnt\n"
        "mmc write <device num> addr blk# cnt\n"
        "mmc rescan <device num>\n"
        "mmc list - lists available devices");
#endif

The "mmc init" is only available when CONFIG_GENERIC_MMC is defined, and it calls into mmc_legacy_init(). The mx51evk implements the new MMC commands with CONFIG_GENERIC_MMC defined. In this case, "mmc rescan 0" is the right command to initialize mmc before "fatload".

MX51EVK U-Boot > mmc rescan 0
MX51EVK U-Boot > fatload mmc 0:2 90800000 boot.scr
reading boot.scr

311 bytes read
MX51EVK U-Boot >