From: Jean-Jacques Hiblot Date: Tue, 25 Jun 2019 21:07:01 +0200 Subject: [U-Boot] [PATCH] mmc: Do not poll using CMD13 when changing timing In-Reply-To: <4ee48767-7926-cace-ce77-0f38e2d717af@gmail.com> References: <20190206131123.24384-1-marek.vasut+renesas@gmail.com> <657c7259-27d7-8251-c967-d106f711d885@ti.com> <4ee48767-7926-cace-ce77-0f38e2d717af@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 25/06/2019 17:53, Marek Vasut wrote: > On 6/25/19 4:13 PM, Jean-Jacques Hiblot wrote: >> Hi Marek, >> >> On 06/02/2019 14:11, Marek Vasut wrote: >>> When using CMD6 to switch eMMC card timing from HS200/HS400 to HS/legacy, >>> do not poll for the completion status using CMD13, but rather wait 50mS. >>> >>> Once the card receives the CMD6 and starts executing it, the bus is in >>> undefined state until both the card finishes executing the command and >>> until the controller switches the bus to matching timing configuration. >>> During this time, it is not possible to transport any commands or data >>> across the bus, which includes the CMD13. >> Is it something that affects all platforms ? >> >> I've been working on this on TI platforms lately and although I've seen >> the same kind of problems. But they mostly go away If the code handling >> the switch handles the SWITCH_ERROR bit. > The error probably happens because you send the card a command, but the > command hits the bus that's in some weird intermediate state. Either the > card didn't finish switching the bus properties yet, or it did, or it's > in the middle of it, but you cannot tell. OK thanks for the response. If CMD13 can't be used because the bus is in an undefined state, shouldn't send_cmd(CMD13) just fail ? I'm asking because this is a 50ms delay in the hot path of the boot process. JJ > > [...] >