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 9EEAEC7EE24 for ; Sat, 6 May 2023 17:41:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8CCC285EC9; Sat, 6 May 2023 19:41:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kwiboo.se header.i=@kwiboo.se header.b="Z9RyCc9+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2D23585E55; Sat, 6 May 2023 19:41:14 +0200 (CEST) Received: from s.wrqvtzvf.outbound-mail.sendgrid.net (s.wrqvtzvf.outbound-mail.sendgrid.net [149.72.126.143]) (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 D2C9F85B6E for ; Sat, 6 May 2023 19:41:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bounces+31435339-7456-u-boot=lists.denx.de@em2124.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type:cc:content-type:from:subject:to; s=s1; bh=Tf6SbkE9215ypG3AS96/lTZChFWUqS/oTtLPhE/E3Bk=; b=Z9RyCc9+unMMYFJjkyjAqcZXPjQGQtX97IeR3gnPe4AbIVztluKD34V3jfg3x6c0ldNF HNthcMweZotFBKQCjqfCxegcabPtADHJGPwolChRmgJLru7FRKTw/GpcC2vWwfrj4lZAtY lxdtSjJwSg0N6kw6/NUlM7ypcATvPP/Pd2Df1C7UwYl0vIkjzqdMZMgH1ZXx6ro8TayiNx wGlzN0fVBHFmczmdFhjMy9IUUxXBfinT6Se0HVgCBvkEj6z8g07ipeQ2Z+29IPXrpqJpZ8 q1g3cQdjwRlzoJxmyB2tFngkmogrrc1URPLM2AyGkgDoSPW1EppLqaHTdLVRhfeQ== Received: by filterdrecv-7946957d94-sf488 with SMTP id filterdrecv-7946957d94-sf488-1-64569135-17 2023-05-06 17:41:09.493700319 +0000 UTC m=+965762.497267543 Received: from bionic.localdomain (unknown) by geopod-ismtpd-5 (SG) with ESMTP id mHcd3vcSQUCkZMNbrBTKug Sat, 06 May 2023 17:41:09.183 +0000 (UTC) From: Jonas Karlman Subject: [PATCH 1/5] mmc: rockchip_sdhci: Skip blocks read workaround on RK3399 Date: Sat, 06 May 2023 17:41:09 +0000 (UTC) Message-Id: <20230506174104.1728148-2-jonas@kwiboo.se> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230506174104.1728148-1-jonas@kwiboo.se> References: <20230506174104.1728148-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h1qmNQIlm02KAtdfu?= =?us-ascii?Q?=2F8b9E3P4lE=2FRXGx1f=2FtCmmkQC66nWBzj9EkK4fr?= =?us-ascii?Q?pJKxt+9fYS23Rg248ojFoAzbcFqpxPM2pOzqHCb?= =?us-ascii?Q?07WZNjedGFZgJp+lHj1eJMb+mtgsus0PXSv5I5T?= =?us-ascii?Q?CkBu393XNqwH4=2FTb1HJ=2FAnpiLNC1pVZUx2m6vF?= To: Simon Glass , Kever Yang , Philipp Tomsich , Peng Fan , Jaehoon Chung , Jonas Karlman Cc: Eugen Hristev , u-boot@lists.denx.de X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii 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 The workaround to limit number of blocks to read in a single command should only be applied to RK3568 and RK3588. Change to be more strict when to apply the workaround. Fixes: 2cc6cde647e2 ("mmc: rockchip_sdhci: Limit number of blocks read in a single command") Suggested-by: Simon Glass Signed-off-by: Jonas Karlman --- drivers/mmc/rockchip_sdhci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c index 4f110976f4e8..8e4a158049a9 100644 --- a/drivers/mmc/rockchip_sdhci.c +++ b/drivers/mmc/rockchip_sdhci.c @@ -594,7 +594,9 @@ static int rockchip_sdhci_probe(struct udevice *dev) * triggers Data End Bit Error on RK3568 and RK3588. Limit to reading * max 4 blocks in one command when using PIO mode. */ - if (!(host->flags & USE_DMA)) + if (!(host->flags & USE_DMA) && + (device_is_compatible(dev, "rockchip,rk3568-dwcmshc") || + device_is_compatible(dev, "rockchip,rk3588-dwcmshc"))) cfg->b_max = 4; return sdhci_probe(dev); -- 2.40.1