From patchwork Mon Mar 21 11:39:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 1607702 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=VhNb9hHl; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sartura-hr.20210112.gappssmtp.com header.i=@sartura-hr.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=x/RvC9nV; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KMXmH5gpzz9s0r for ; Mon, 21 Mar 2022 22:42:38 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hz13es/YYCfofEy+xCzGR/x0jSfp606n3WfPsX83q8E=; b=VhNb9hHlwIi8SR BaYSeVnwu34EGSCV/S2aQuCowfNzn67CFiYih5FynsiaTo2w62EFdKkAH9uCW1BpKj8I6g4VVKTyy +8kLvFvysnU9aYkMFRjXoWOFjt4ehJl73bcl0Nlcf8qYeJL3Ki+dK24rFQjaUcAtLWpMX2p7pRC6r uPiPzuxohsnlamHPaZXhMah0zhkqbCKS2zeC/dgdMUKdEX9nBtltTboM9KxSrY63TtQ5QVVGI3Yzn Bf4KXA+8LukktU6kG9z1FY70rdfJlDlmFpCBnIl6Hb4eeQ4LaRHhfWnOquhAcEo/Jv57DoV1poMRp wZUvWGedVr3d2H8Uwipg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWGOQ-007T2b-7w; Mon, 21 Mar 2022 11:40:10 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWGOM-007T1I-6b for openwrt-devel@lists.openwrt.org; Mon, 21 Mar 2022 11:40:07 +0000 Received: by mail-ej1-x636.google.com with SMTP id o10so10459149ejd.1 for ; Mon, 21 Mar 2022 04:40:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3BauSj52+6Ex2/EdIGvWJAl4dhVopy6fFZsgFlIrMGo=; b=x/RvC9nVwOtb2iRciZrrEYrNQoc8Pz3dpafgFiM3jg9Cj2dUJfwaIBOyUoA4+3EZIS Zb4ATrd5qH6U7t9YFQh6xya7IOixjPw6YHPk+fy8hWrr4lByyr8HCpvP5TrTpQUCooCF gikTUcfJQrNI5qKje7xoPy1Dnk8Qe4ENkQiu66Wxxokdg5MMe82oMh6rr/5be3U1LCur RYS3koPWH+PLRLyS18SPekyXZUT9plvkUX7DhxVc+cnGV9knSPoOsXz4ys90cYiJWkfu 2gaYw5B1kP+JmvhFx+OfIzFO0I+FOrccs3x49h0AIRvxxZF9sClXf6eJpn3q8OeeHKKk 37JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3BauSj52+6Ex2/EdIGvWJAl4dhVopy6fFZsgFlIrMGo=; b=HCdgx3+/fWSSffHjvCyz6OuWgsMppNrsoYlgSnZSUwatjG0FDzCnmtW/pzK4Zrqo09 bKfVWBv0DKO6pNewtq6+8udXY5nS7mzUmz743pTjsGZ4uvhcIieZJOpZ/GKrYDNoacur cN3r/kO6BQNvFbLTGOwxnODMtnO+4zm+d/3u+/IFro9cwVkTze4hhlyfzPIOtN7MeSo0 7DoRFCkk/AhRC9F0d+617A4z+Fp9+0azUG6LIMMqIDrUvLfHg3inpoIHksL2gi5ilht6 kp2nNXSCoao5vtP0kQLU8c6LzeCH5JVuieCtC3EJMtMzvgvbtLF5eQQyXIBxpVk+1jHx imYQ== X-Gm-Message-State: AOAM530XkdBUplmwdJ2kQNPHhdrEyZW3CKibTSS/kIkCCs38hb1lkXRw MLPsN6U37ejMnj6Dz8wvh/NSZDAik3HCcniv2vs0K+D7Dil6R0Jfw9hDfAWYJ3ugC3/2+QAyePK DaPtCBluL93QeV81/yIc8w0iLwLZ1CjMS/nsO8tP4QoRr977lMg0k5LbIhBlaG34FgyFFAvzABy ZpTg+jQpmqCvDcpg== X-Google-Smtp-Source: ABdhPJzxnOpsONQoYh2Cq+27YUwmA4vMi5/Nr7b1yHQlVQuqwLcTlmzo7L/r5yZo/5WOmo9HOlp0bQ== X-Received: by 2002:a17:906:b052:b0:6ce:88a5:e42a with SMTP id bj18-20020a170906b05200b006ce88a5e42amr21079048ejb.237.1647862800106; Mon, 21 Mar 2022 04:40:00 -0700 (PDT) Received: from fedora.robimarko.hr (cpezg-94-253-144-57-cbl.xnet.hr. [94.253.144.57]) by smtp.googlemail.com with ESMTPSA id p23-20020a170906605700b006ccebe7f75dsm6797608ejj.123.2022.03.21.04.39.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 04:39:59 -0700 (PDT) From: Robert Marko To: openwrt-devel@lists.openwrt.org Cc: Robert Marko Subject: [PATCH] uboot-mvebu: backport patch to fix eMMC Date: Mon, 21 Mar 2022 12:39:54 +0100 Message-Id: <20220321113954.407355-1-robert.marko@sartura.hr> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220321_044006_296169_B31FCDBE X-CRM114-Status: GOOD ( 21.59 ) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: v2022.01 has a regression that broke eMMC usage on most if not all Armada SoC-s, thus breaking boards like uDPU which use eMMC for storage. Fix it by backporting a recent upstream patch. Fixes: 782d4c8306c8 ("uboot-mvebu: update to version 2022.01") Signed-off-by: Robert Marko --- ...enon_sdhci-remove-wait_dat0-SDHCI-OP.patch | 64 +++++++++++++++++++ 1 file c [...] Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:636 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org v2022.01 has a regression that broke eMMC usage on most if not all Armada SoC-s, thus breaking boards like uDPU which use eMMC for storage. Fix it by backporting a recent upstream patch. Fixes: 782d4c8306c8 ("uboot-mvebu: update to version 2022.01") Signed-off-by: Robert Marko --- ...enon_sdhci-remove-wait_dat0-SDHCI-OP.patch | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 package/boot/uboot-mvebu/patches/013-mmc-xenon_sdhci-remove-wait_dat0-SDHCI-OP.patch diff --git a/package/boot/uboot-mvebu/patches/013-mmc-xenon_sdhci-remove-wait_dat0-SDHCI-OP.patch b/package/boot/uboot-mvebu/patches/013-mmc-xenon_sdhci-remove-wait_dat0-SDHCI-OP.patch new file mode 100644 index 0000000000..3277638784 --- /dev/null +++ b/package/boot/uboot-mvebu/patches/013-mmc-xenon_sdhci-remove-wait_dat0-SDHCI-OP.patch @@ -0,0 +1,64 @@ +From 0f3466f52fbacce67e147b9234e6323edff26a6d Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Fri, 11 Mar 2022 19:14:07 +0100 +Subject: [PATCH] mmc: xenon_sdhci: remove wait_dat0 SDHCI OP +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Generic SDHCI driver received support for checking the busy status by +polling the DAT[0] level instead of waiting for the worst MMC switch time. + +Unfortunately, it appears that this does not work for Xenon controllers +despite being a part of the standard SDHCI registers and the Armada 3720 +datasheet itself telling that BIT(20) is useful for detecting the DAT[0] +busy signal. + +I have tried increasing the timeout value, but I have newer managed to +catch DAT_LEVEL bits change from 0 at all. + +This issue appears to hit most if not all SoC-s supported by Xenon driver, +at least A3720, A8040 and CN9130 have non working eMMC currently. + +So, until a better solution is found drop the wait_dat0 OP for Xenon. +I was able to only test it on A3720, but it should work for others as well. + +Fixes: 40e6f52454fc ("drivers: mmc: Add wait_dat0 support for sdhci driver") +Signed-off-by: Robert Marko +Reviewed-by: Marek BehĂșn +Reviewed-by: Jaehoon Chung +Reviewed-by: Stefan Roese +--- + drivers/mmc/xenon_sdhci.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/mmc/xenon_sdhci.c ++++ b/drivers/mmc/xenon_sdhci.c +@@ -439,6 +439,8 @@ static const struct sdhci_ops xenon_sdhc + .set_ios_post = xenon_sdhci_set_ios_post + }; + ++static struct dm_mmc_ops xenon_mmc_ops; ++ + static int xenon_sdhci_probe(struct udevice *dev) + { + struct xenon_sdhci_plat *plat = dev_get_plat(dev); +@@ -452,6 +454,9 @@ static int xenon_sdhci_probe(struct udev + host->mmc->dev = dev; + upriv->mmc = host->mmc; + ++ xenon_mmc_ops = sdhci_ops; ++ xenon_mmc_ops.wait_dat0 = NULL; ++ + /* Set quirks */ + host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_32BIT_DMA_ADDR; + +@@ -568,7 +573,7 @@ U_BOOT_DRIVER(xenon_sdhci_drv) = { + .id = UCLASS_MMC, + .of_match = xenon_sdhci_ids, + .of_to_plat = xenon_sdhci_of_to_plat, +- .ops = &sdhci_ops, ++ .ops = &xenon_mmc_ops, + .bind = xenon_sdhci_bind, + .probe = xenon_sdhci_probe, + .remove = xenon_sdhci_remove,