From patchwork Wed Dec 2 19:28:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Nelson X-Patchwork-Id: 551674 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9B47F14029E for ; Thu, 3 Dec 2015 06:29:06 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=nelint.com header.i=@nelint.com header.b=WUWGhrih; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F121D4BAB4; Wed, 2 Dec 2015 20:29:02 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QXOXhHMWNzC5; Wed, 2 Dec 2015 20:29:02 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0C7FE4BAAB; Wed, 2 Dec 2015 20:29:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 868894BAAB for ; Wed, 2 Dec 2015 20:28:59 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L-xqlHAIq1k6 for ; Wed, 2 Dec 2015 20:28:59 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by theia.denx.de (Postfix) with ESMTPS id 08B9A4BAAA for ; Wed, 2 Dec 2015 20:28:55 +0100 (CET) Received: by pabfh17 with SMTP id fh17so50529899pab.0 for ; Wed, 02 Dec 2015 11:28:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nelint.com; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=q/HFkROu04EJrG8rowC4eAIjNJ1yv6IuDAo/muz0dQo=; b=WUWGhrihBcEwe5Op3ZBYFT/aC5Y1Cl3hNeFiSNSyoblrgkYSKfKIws8hXbErtzO23l IowNGBp2Pr4NdOco1egoslemvIqhWNsJN8GGTtsdICWwImgnT/6zNjusNZErjCMzp2iv c830CVwUTHZ+uPmd21S6g6x81/lTm780dQ0IM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=q/HFkROu04EJrG8rowC4eAIjNJ1yv6IuDAo/muz0dQo=; b=dbUKS3A/m71QW0PwIIQMahmy6w+u1rNMYy6Wgt9IyhCnNKHMFamXPsS4mrLqrfKq/Y 40W0gLKC2bxrc0QQj0W+bljUnxydV1fu/J7WrhUsXLE2WH1eG+CYnrA16hgvDwFW9kJH xlUrjW6xTHEPI8Png5nVYKa8XkGvgyi5a1SyxZ+vTc8mBxYciNAJeQu8J79NhaD4mzMP d2tHBn3XlBDW3hljV9m8kM7KbfHlVCI8R0sbp982cz1Xa2OTov2W27UsrfwF40W9TO9P VnX3bOk1dH6zEIqaVfupsXkqDHxCvmDE3X0l8N8ELmVGxz+7cLW1gCO3EMtCJKs8lrR+ aREQ== X-Gm-Message-State: ALoCoQknmgWPIFADDRR0DPHJI8dvAs/HC3LyEDYANkSIWxOFju/BsVD9ro0Q7Uo/vaagt2MFUdhg X-Received: by 10.66.219.194 with SMTP id pq2mr7106459pac.107.1449084534204; Wed, 02 Dec 2015 11:28:54 -0800 (PST) Received: from [192.168.2.184] (ip98-165-107-234.ph.ph.cox.net. [98.165.107.234]) by smtp.gmail.com with ESMTPSA id c20sm5933870pfd.17.2015.12.02.11.28.53 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Dec 2015 11:28:53 -0800 (PST) To: Fabio Estevam References: <5620E3A7.7040909@defengcorp.com> <5624CEC5.8040901@digi.com> <52F917CEA1B9C64C94833D53889D478C269236@dor-sms-xch01.digi.com> <565DEF80.90204@nelint.com> <565F3CD3.1010100@nelint.com> From: Eric Nelson X-Enigmail-Draft-Status: N1110 Message-ID: <565F4674.8010306@nelint.com> Date: Wed, 2 Dec 2015 12:28:52 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Cc: Cliff Brust , U-Boot-Denx , "Palacios, Hector" , "fabio.estevam@freescale.com" Subject: Re: [U-Boot] mmc erase fails from U-Boot command line X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Hi Fabio, On 12/02/2015 11:52 AM, Fabio Estevam wrote: > Hi Eric, > > On Wed, Dec 2, 2015 at 4:47 PM, Eric Nelson wrote: >> Sure. It's a hack, but shows where we're hitting the problem >> (with the stop command). >> >> We haven't been using the "mmc erase" command, but see this when >> using ums to program eMMC. > > Ok, applied your patch, but still get: > > => mmc erase 4000 1000 > > MMC erase: dev # 2, block # 16384, count 4096 ... Timeout waiting for DAT0 to go > high! > mmc erase failed > 0 blocks erased: ERROR > => > You're hitting the block from a different path than we are and it will be tomorrow before I can get an offending board on my desk. What happens if you "#if 0" around this block? http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mmc/fsl_esdhc.c;h=c5054d66bdcda029f0485958c87bd5154ccee591;hb=HEAD#l390 Do you know which command is failing? It should be one of these: MMC_CMD_ERASE_GROUP_START MMC_CMD_ERASE_GROUP_END MMC_CMD_ERASE http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mmc/mmc_write.c;h=7aea7e943b9e05c8aa537653f4ae8878ecb1b04b;hb=HEAD#l17 I think you can instrument and find out using this: diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 53084a7..8f5d9e1 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -105,6 +105,9 @@ int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) #else ret = mmc->cfg->ops->send_cmd(mmc, cmd, data); #endif + if (ret) + printf("error %d from CMD_SEND:%d\n", ret, cmd->cmdidx); + return ret; }