From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Fri, 23 May 2014 12:59:53 -0600 Subject: [U-Boot] [PATCH V2] cmd_mmc.c: check mmc_init() during mmc dev In-Reply-To: <1400605052-14714-1-git-send-email-swarren@wwwdotorg.org> References: <1400605052-14714-1-git-send-email-swarren@wwwdotorg.org> Message-ID: <537F9AA9.1030004@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/20/2014 10:57 AM, Stephen Warren wrote: > From: Bryan Wu > > 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)