From patchwork Fri Dec 4 16:50:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Nelson X-Patchwork-Id: 552805 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 A614C1402A0 for ; Sat, 5 Dec 2015 03:50:42 +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=gb4vkGg1; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F03AA4B668; Fri, 4 Dec 2015 17:50:39 +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 1DrTzNRDr5Xk; Fri, 4 Dec 2015 17:50:39 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E33C14B65A; Fri, 4 Dec 2015 17:50:38 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 92CA44B65A for ; Fri, 4 Dec 2015 17:50:35 +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 eb03-wEBc4F8 for ; Fri, 4 Dec 2015 17:50:35 +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-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by theia.denx.de (Postfix) with ESMTPS id 0FB754B656 for ; Fri, 4 Dec 2015 17:50:32 +0100 (CET) Received: by pabfh17 with SMTP id fh17so91855281pab.0 for ; Fri, 04 Dec 2015 08:50:30 -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=uN69rvP0uwY0QQlpMn3CUb7RH8FBTpZmV0FUirI8N4s=; b=gb4vkGg1TuXdaV61TYI/sn4r1IKaG9CNNm9XK9nwUFrAXtFNZjFMPtNSnFuTYl9tpv 5+C4tK6KqU7XLvZIk6o1J4CfyBAiExRFU4hqAyzvWuE2Dk0IJs5+Y7fWTFYtxXGoMjsn 2Jvu5Xy9fK8evXbo05/BP/lo8bdtA9pM0YTkY= 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=uN69rvP0uwY0QQlpMn3CUb7RH8FBTpZmV0FUirI8N4s=; b=IMGCbkayoSy4AkgxBLoO0bKwlplU0C2bb57uytCraCH8mlElv9R+KnV4OFGyjAKvzl wQMv9dMpXCRviG6e4J+YHc2VbMwAPdfPX4HXjx/mEeJFL5Hw2DYtTpPPc5TAdlAkeNBW yPG1s9KIz7wJHZZ7WfVa63whg31oqBZHbUpzbU3hU/TZ4rkq5bNwB2zN15uILe17EKLR HYffXF10/UZOGnIzOD3vi+iJ0MI4/HDKCCMNL7uo/n60Y2Hovq2qodlVGeYmW6cQQJkD FX8nPo7ZqCE5tP/q3aMDFlj3Du6apijpU3Z+Ug61NZGVvnfR9r8uqVQmUARzd1nR8Sgp VIug== X-Gm-Message-State: ALoCoQmfsX4U8vBG321mDxB4V9+Hbm5Ecaq9L6wrHACfKkBaafQnx1/45psQ6kEe9S1wcU5IEC22 X-Received: by 10.66.227.1 with SMTP id rw1mr23151889pac.35.1449247830592; Fri, 04 Dec 2015 08:50:30 -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 qy7sm18240959pab.37.2015.12.04.08.50.29 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Dec 2015 08:50:30 -0800 (PST) To: Michael Trimarchi , 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> <5661BA7B.8030904@nelint.com> From: Eric Nelson Message-ID: <5661C454.5030706@nelint.com> Date: Fri, 4 Dec 2015 09:50:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <5661BA7B.8030904@nelint.com> Cc: Cliff Brust , U-Boot-Denx , Dirk Behme , "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 all, On 12/04/2015 09:08 AM, Eric Nelson wrote: ... > > I think you're onto something. > > According to the i.MX35 reference manual, which I think was the origin > of this patch, the low four bits of the SYSCTL register of the SDHC5 > 3 - SDCLKEN > 2 - PEREN > 1 - HCKEN > 0 - IPGEN > > See page 603 of > http://cache.freescale.com/files/dsp/doc/ref_manual/IMX35RM.pdf > > But in the i.MX6 reference manual, the low four bits are reserved and > say "Always write as 1". > > See pages 5679-5680 of > http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf > > It appears that when this patch was ported from the Freescale version, > the test for "is_usdhc" was lost. > > http://git.denx.de/?p=u-boot.git;a=commitdiff;h=7a5b80297bc6cef0c10e5f57ac0450678dc7bc5e > > Following up, this code is bugged on i.MX6: http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mmc/fsl_esdhc.c;h=c5054d66bdcda029f0485958c87bd5154ccee591;hb=HEAD#l505 As are a couple of other things in the driver, as seen by trying to compile without the constants for the low 4 bits: diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h index aa1b4cf..a4b87ce 100644 --- a/include/fsl_esdhc.h +++ b/include/fsl_esdhc.h @@ -25,10 +25,12 @@ #define SYSCTL_INITA 0x08000000 #define SYSCTL_TIMEOUT_MASK 0x000f0000 #define SYSCTL_CLOCK_MASK 0x0000fff0 +#if !defined(CONFIG_MX6) #define SYSCTL_CKEN 0x00000008 #define SYSCTL_PEREN 0x00000004 #define SYSCTL_HCKEN 0x00000002 #define SYSCTL_IPGEN 0x00000001 +#endif #define SYSCTL_RSTA 0x01000000 #define SYSCTL_RSTC 0x02000000 #define SYSCTL_RSTD 0x04000000