From patchwork Thu Jul 11 13:00:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 1959326 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=fOA2kain; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=geanix.com header.i=@geanix.com header.a=rsa-sha256 header.s=default2211 header.b=aCUl1B0v; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WKZhg656Yz1xqr for ; Thu, 11 Jul 2024 23:05:23 +1000 (AEST) 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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ddaxw5lAGN2VDuDQ2H2byAe+wFxI/LPAxOyGlGe9I2A=; b=fOA2kainRJAnsj 5jbLipehACcEiImwebBTSeMeS1ysx+XUkWAlJUUAzveCOhH5K5JL37AxyhDWbsPjiO3P6qzdwQJH3 Ae4btp6+gYbbYYcLI6hBc/uOy+4kSolpRizd7KLk5md38YPRxzW0PnsgVvAx7fsyT/vlfu8SaG6Ih kuviD0A/z+Vgv+eyNq4SOJe7tnx32wFlK6clGtUyGxzpCWt6PmgaNrFt4nRnRbcZGaUFJIxbGiiqt TEGV3OmWc1w926MDvSXmX64f/6uvkS/AdWhT7CYiR69ycnkdB3F8D94RerTgM07by/A8JLBNPBKD6 S/V0h7jo7sWPae4xWUDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtU2-0000000E4Qx-2mln; Thu, 11 Jul 2024 13:05:14 +0000 Received: from www530.your-server.de ([188.40.30.78]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtPZ-0000000E1aj-0mNM; Thu, 11 Jul 2024 13:00:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=geanix.com; s=default2211; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID; bh=7xyZ8HHn0IZWh6egUhr+Bg7rKb1uk2wj2zFy5v+GCaQ=; b=aCUl1B0v47gN1/uvq5rteboPaf apgKX4cWeUJ1cYM32MyHLdlDJESJUuiLLgMW4S1RyGVoSDXgk4wZft8hih4YdXBh3BOsLzDh4eIuh f2K2mVj1rLvmlZMhgo+RGeU9qpIvexglBb8udkC4tbdWbUWnM9rXMfTrcAMTXyTsp6sWSJ0CmKKSf 3ZSPh2ll6k3Jn6C0fJOxtsAsLTKWcoJxtMyEOhR43GLLA7n1srtlYjwYOauHX2i0dgybu9gptBMiQ 4xLdfBq5M+CBTc+C+orAi5NifFulIJ1qcqctB+5lp67LgmWUnHlU4smsdxG0J2QQPhs5ziEzKakGy s2RjH2bA==; Received: from sslproxy02.your-server.de ([78.47.166.47]) by www530.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sRtPX-000BXO-QP; Thu, 11 Jul 2024 15:00:35 +0200 Received: from [87.49.147.209] (helo=localhost) by sslproxy02.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sRtPX-0005Sd-21; Thu, 11 Jul 2024 15:00:35 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:14 +0200 Subject: [PATCH v3 14/15] mtd: spi-nor: Drop deprecated mechanism for optional SFDP parsing MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-14-99353461dd2d@geanix.com> References: <20240711-macronix-mx25l3205d-fixups-v3-0-99353461dd2d@geanix.com> In-Reply-To: <20240711-macronix-mx25l3205d-fixups-v3-0-99353461dd2d@geanix.com> To: Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Rasmus Villemoes , linux-arm-kernel@lists.infradead.org, Esben Haabendal X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1720702815; l=1575; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=lx0qh4MEN+MdnHMi3c/iFde5nWg07mHVMzlT3b+knLE=; b=a22i1tAFizJHUc1rtMZlDS3qeje8OHPMmoxGx1U79ayOl1Y1paFDvuxTl14XxgibUqAhjI2GE 3QVO/Fqm3/vDgMHVi2ms0gY4AJahWN7z2IuAAJ364aL4LqcjxyC/tvc X-Developer-Key: i=esben@geanix.com; a=ed25519; pk=PbXoezm+CERhtgVeF/QAgXtEzSkDIahcWfC7RIXNdEk= X-Authenticated-Sender: esben@geanix.com X-Virus-Scanned: Clear (ClamAV 0.103.10/27333/Thu Jul 11 10:35:59 2024) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240711_060037_252678_F388806A X-CRM114-Status: GOOD ( 11.01 ) X-Spam-Score: -2.1 (--) 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: With all drivers converted to the new SPI_NOR_TRY_SFDP flag, we can remove the old deprecated mechanism for triggering optional SFDP parsing. New flashes must use SPI_NOR_TRY_SFDP to get this behavior. Hopefully, all new drivers will be fore pure SFDP flashes, so no or at least very few new users of this flag is expected. Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -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_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org With all drivers converted to the new SPI_NOR_TRY_SFDP flag, we can remove the old deprecated mechanism for triggering optional SFDP parsing. New flashes must use SPI_NOR_TRY_SFDP to get this behavior. Hopefully, all new drivers will be fore pure SFDP flashes, so no or at least very few new users of this flag is expected. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/core.h | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index dfc81716e068..f4a76f42051a 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -719,24 +719,7 @@ static inline bool spi_nor_needs_sfdp(const struct spi_nor *nor) */ static inline bool spi_nor_try_sfdp(const struct spi_nor *nor) { - if (nor->info->no_sfdp_flags & SPI_NOR_SKIP_SFDP) - return false; - if (nor->info->no_sfdp_flags & SPI_NOR_TRY_SFDP) - return true; - - /* Deprecated/legacy way for triggering optional SFDP parsing. - * If one of the no_sfdp_flags indicating dual, quad or octal read is - * set, SFDP parsing will be tried. - * When all drivers have been converted to set SPI_NOR_TRY_SFDP where - * needed, this deprecated mechanism can be removed. - */ - if (nor->info->no_sfdp_flags & (SPI_NOR_DUAL_READ | - SPI_NOR_QUAD_READ | - SPI_NOR_OCTAL_READ | - SPI_NOR_OCTAL_DTR_READ)) - return true; - - return false; + return (nor->info->no_sfdp_flags & SPI_NOR_TRY_SFDP) } #ifdef CONFIG_DEBUG_FS