From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09C77C77B7C for ; Sun, 7 May 2023 14:40:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 38E6A83741; Sun, 7 May 2023 16:40:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="j6hgVYx4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 22ECB84674; Sun, 7 May 2023 16:40:50 +0200 (CEST) Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A5BBE8267E for ; Sun, 7 May 2023 16:40:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-b9a6eec8611so21273798276.0 for ; Sun, 07 May 2023 07:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1683470446; x=1686062446; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=t8Jfr9fb2R6ZZPOy2cEtCDNf38dgelEbX15Yz1qe/cI=; b=j6hgVYx4bzMY54PboDEOjNKuZjNR5e63vkr89Kh5/rbg9LcQw78x9O2qunl3w9dxJy NrtopBzGGHDs8bR53O6TiM8phjKnE/MQ9ri9xCPH6AD3LWxVmrvF5CZecn5Di/Izkup0 LA4fSUhzXCLQCDfmQMRW+Lbas4gDCb6ky9u6A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683470446; x=1686062446; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=t8Jfr9fb2R6ZZPOy2cEtCDNf38dgelEbX15Yz1qe/cI=; b=C4Of/mERnwrpIywxqw9+11uLm3CAH6tJfjXIP7PHH8VFbHwme2CqEQKfvpKj/LE0Jn M6AsV0reBe/Kd2RxBWdkZcHImYLC2cJhLWj4xRG3n1LVxsoJiQ8FAN9GENtjxiBHT621 a0lwCuJeBvt+TYTJt185XUnt3Aq83FFqHiDdkrdyg+wPxT6Tlt6nu7n/IejIkh4RgGt0 wIrONFBrwJ58w5UU38Dh97Uvwn3SmtAdELnheXRCMkxN0wap5IdOUzBDId8qXkhpUCMm a8qG/4Pd9vJsFFNXDZFh2YX8tFTGC7PwVwbSP/SmCQA0XlNmfnBeWxe8tUCfnZwB/V2a G2Dw== X-Gm-Message-State: AC+VfDw7Vse2ArA65sRXRbPgWD0BaEkoyxPNVgZPYiI+8b/ANkpWytgt L3ngZfFpDXXWYZQTTENnERfl2GJ2Ear6wMAPgCgp3w== X-Google-Smtp-Source: ACHHUZ4TSq1QkIV8a5jZNy8YMVvQKmyTaogqEIODzNsMuwECRgnpZEdcgWK/5eu1G3C+YEnMwUO5zA== X-Received: by 2002:a0d:ccc9:0:b0:559:d19a:37ee with SMTP id o192-20020a0dccc9000000b00559d19a37eemr7287029ywd.15.1683470446213; Sun, 07 May 2023 07:40:46 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-d7e6-fe63-3759-dafe.res6.spectrum.com. [2603:6081:7b00:6400:d7e6:fe63:3759:dafe]) by smtp.gmail.com with ESMTPSA id o185-20020a8173c2000000b00556b26dff6bsm1813095ywc.64.2023.05.07.07.40.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 07:40:45 -0700 (PDT) Date: Sun, 7 May 2023 10:40:44 -0400 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Martin Rowe , Stefan Roese , U-Boot Mailing List Subject: Re: mmc: Read eMMC partition access bits before card reset Message-ID: <20230507144044.GA293044@bill-the-cat> References: <54f170af-4f8f-2481-6419-7098f27dc037@denx.de> <20230503171456.GF1134230@bill-the-cat> <20230505193710.n35h2ofq6fogk4bq@pali> <20230507135452.GZ293044@bill-the-cat> <20230507140104.7wuzf7ymdkznxl26@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nMN/7hwinXgcIAXW" Content-Disposition: inline In-Reply-To: <20230507140104.7wuzf7ymdkznxl26@pali> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean --nMN/7hwinXgcIAXW Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 07, 2023 at 04:01:04PM +0200, Pali Roh=E1r wrote: > On Sunday 07 May 2023 09:54:52 Tom Rini wrote: > > On Fri, May 05, 2023 at 09:37:10PM +0200, Pali Roh=E1r wrote: > > > On Wednesday 03 May 2023 13:14:56 Tom Rini wrote: > > > > On Wed, May 03, 2023 at 11:18:39AM +0200, Stefan Roese wrote: > > > >=20 > > > > > Hi Tom, > > > > >=20 > > > > > please pull this next batch of mostly Marvell related patches: > > > >=20 > > > > NAK. With commit: > > > > commit 461fa17970de418a93832f734a595031c0b72128 > > > > Author: Pali Roh=E1r > > > > Date: Thu Apr 13 22:57:48 2023 +0200 > > > >=20 > > > > mmc: Read eMMC partition access bits before card reset > > > > =20 > > > > eMMC specification in section "Access partitions" says that all= reset > > > > events will restore the access bits in PARTITION_CONFIG CSD reg= ister to > > > > default User Data Area value (0b000). > > > > =20 > > > > So read partition access bits from PARTITION_CONFIG CSD registe= r before > > > > issuing card reset. This allows SPL/U-Boot to get information w= hich eMMC > > > > partition was in use before SPL/U-Boot was booted. For some pla= tforms this > > > > is the way how to determinate boot partition from which BootROM= loaded SPL. > > > > =20 > > > > Signed-off-by: Pali Roh=E1r > > > >=20 > > > > My am335x_evm now fails to boot with: > > > >=20 > > > > U-Boot SPL 2023.07-rc1-00021-g461fa17970de (May 03 2023 - 13:10:10 = -0400) > > > > Trying to boot from MMC1 > > > > omap_hsmmc_send_cmd: timedout waiting on cmd inhibit to clear > > > > spl: mmc init failed with error: -110 > > > > SPL: failed to boot from all boot devices > > > > ### ERROR ### Please RESET the board ### > > > >=20 > > > > I can provide more details / test patches as needed. > > > >=20 > > > > --=20 > > > > Tom > > >=20 > > > I do not know what to do with this... The only idea is to hide this c= ode > > > behind CONFIG symbol and enable it only for mvebu. For example by thi= s: > >=20 > > Well, maybe the problem is we're trying this on uSD cards? The failure I > > reported was uSD and not eMMC. >=20 > Maybe it is that reason. Problem is that at this stage we do not know if > card is SD or MMC. >=20 > Martin, can you check if booting from SD card is working fine on mvebu > clearfog? >=20 > > I see a failure with this commit on > > rpi_3_32b, also from uSD boot. This time it's: > > Loading Environment from FAT... fsm 0, hsts 00000000 > > fsm 0, hsts 00000000 > > ... > >=20 > > once in U-Boot itself. Going to the commit prior to the above one and > > the board is fine again. > >=20 > > --=20 > > Tom >=20 > Immediately after that "problematic code" is card reset function. So > another reason for failure is that card reset functionality does not > work correctly on your board / platform. Well, we're at two different platforms and controllers that this change breaks things on, so I'm not sure where the fault is exactly. My mx6cuboxi is still fine booting from uSD. Another TI platform from the same general era as am335x fails the same way (not a surprise), amlogic libretech-cc is fine, pine64_plus is fine, and my newer TI platforms are also fine with this. So maybe the Kconfig is fine, but we just want default y, default n if ARCH_OMAP2PLUS || ARCH_BCM283X (the TI platforms that work are not ARCH_OMAP2PLUS). --=20 Tom --nMN/7hwinXgcIAXW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmRXuGgACgkQFHw5/5Y0 tyyS1AwAoQbLdQyjeT3Ixu000YWyoxOc3tQZNuDH6759kfmsxiMYn4h6gKC282Ah Z6qqitJVl/6I7PZXSjRY86Anj85rhT8pk1owN6+VDLzEjK2InM45plzWobws0Jts Yi6QoKef+qdDTwD6bAs+4UhX4O4Uq49fVyYKlwFBvEtop2KCI3ToNznFE8B691NM FADUzI1dqcZt689IGZgkzfqHShLQBtdQihYFxtsnzlGjgKZxQqT5H3UuUVXZGZci vqciUgGk52JazM3WHPSKSDAgf59UXKJudapVxmrGFdHuE6HMzGhK1huMgGXoqsTL xheS2bQ6RJuhmlSoamMXrPVIMuzIzfI580x0SWd6KFLRO5s/aA8PPQ0sYsHjgDfz rFtJotGUJ2y8bqqngcHqF3+lvQL/uu+8A41JIQfG9fu3d5i1OXc7EIfRx6cR945k 7aN/DeFLBxSlT/gFE+T7ICHdEUvmGHQtGwjr3Dkaz1lVbIdI+JgCwwn679joarx6 ALgXxhZ5 =EZRw -----END PGP SIGNATURE----- --nMN/7hwinXgcIAXW--