[U-Boot] [PATCH V2] cmd_mmc.c: check mmc_init() during mmc dev

Stephen Warren swarren at wwwdotorg.org
Fri May 23 20:59:53 CEST 2014


On 05/20/2014 10:57 AM, Stephen Warren wrote:
> From: Bryan Wu <cooloney at gmail.com>
> 
> mmc dev ${devnum} will return 0 as success even if there is no card
> inserted. Booting script like tegra-common-post.h will call mmc dev
> ${devnum} to check the mmc device status, it always return 0 even if
> mmc_init() fails.
> 
> Check mmc_init() return value let mmc dev command return failure
> when mmc_init() fails.

For the email archive record, it looks like this same logic has already
been implemented as part of:

1fd93c6e7d8a eMMC: cmd_mmc.c adds the 'rpmb' sub-command for the 'mmc'
command

... which was just recently committed into u-boot-mmc/master.

(See the code in init_mmc_device)


More information about the U-Boot mailing list