mx51evk: "mmc init" does not work for "fatload"
Bug #655461 reported by
Shawn Guo
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro U-Boot |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Ideally, "fatload" should work fine after "mmc init" is done. But it hangs like the following.
MX51EVK U-Boot > mmc init
MX51EVK U-Boot > fatload mmc 0:2 90800000 boot.scr
However, "fatload" is working fine behind "mmcinfo" like below.
MX51EVK U-Boot > mmcinfo
Device: FSL_ESDHC
Manufacturer ID: 2
OEM: 544d
Name: SD02G
Tran Speed: 25000000
Rd Block Len: 512
SD version 2.0
High Capacity: No
Capacity: 1967128576
Bus Width: 4-bit
MX51EVK U-Boot > fatload mmc 0:2 90800000 boot.scr
reading boot.scr
311 bytes read
MX51EVK U-Boot >
Changed in u-boot-linaro: | |
status: | New → Invalid |
status: | Invalid → New |
To post a comment you must log in.
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 >