From patchwork Thu Jul 11 13:00:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730675 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0A863C3DA4A for ; Thu, 11 Jul 2024 13:01:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=pxA3/BuB6HUs2tgm/oJDzWCo9cDxy9kfseU0w3KrlBM=; b=wJrAR62nVE2bb3STV721iBhh2c 97+AiUMqKAs+D2pDA1t8LKw2Szqylej3jFMTL26UVH+2X8QCDfBcUizm6A0cu1lXFDUB1YprRY7Qy c4WTs4Bj7nhMYYBHUgkSU9UZ+TuBGt4SqzzlUfOS2Bb0wlzX2e/CWSrDWn4m4ossc1aQW0iQ0q9y3 Tesc0Y7hcNABkU8hdk8p5CVPKVc/akiXPwwDH9sXAyfKDIjDfQPHCLHe5QLKoU+UaIsFcaP7I6TdP RyF0XNKUf8R6M+jiRo7h+tduRAFj6qozqgfMbqwa+rALx5V/wEFyjrPB+ZotR2sOvgcYyKqUdXKYT xxzxjheA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtQA-0000000E1uA-1Gtb; Thu, 11 Jul 2024 13:01: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 1sRtPI-0000000E1Ud-03ZW; Thu, 11 Jul 2024 13:00:23 +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=pxA3/BuB6HUs2tgm/oJDzWCo9cDxy9kfseU0w3KrlBM=; b=oj2PWEA3AHARezlANl6lNDnw3f DvU0ld7f7gMyTCCX+XqI8sRYOGGAYOMJJpthQAdWjFiXWr1cAZ/STJF+cORLJiTwDpA26BJZXTVxo jRIU5rSUyaBOCGp1ykEb1/YoFRaUVUlLHOSkWgHvspJvDRzM7pDI18ZPEQhg9SpTosyurS1DlwZNI XF06pNTYOCpQITU3znkVgtuP4IozyRVUJlV/bDMeWhJnGvkNvftx9dHMPPE7gE4oRo/FeM9T+4FFu vIEOcUzf/UZqEFVPFWJ9H/UJh1+6Bz03hnj3ENbWp8W3kc9nZi1reKPe6NwAYGQSkPPeJzWqtfkFP RqWluiTQ==; 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 1sRtPF-000BRh-6r; Thu, 11 Jul 2024 15:00:17 +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 1sRtPF-000325-05; Thu, 11 Jul 2024 15:00:16 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:01 +0200 Subject: [PATCH v3 01/15] mtd: spi-nor: core: add flag for doing optional SFDP parsing MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-1-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=7503; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=WHJBUERZdI5anYsL4qiSt3EgClUaLQjxdDb2lFpx5J4=; b=aPo3kjmNJg4ZG/Jk8HSE8b2OJJtk00MAsuWZNutgFfPkLAhHZ8msjdGZnka1BMxpq5bmZ47GR 3xzfEdOiyJ/DQsOR5bAp9sTfDtPhmBbCyPvZWxPLJeqT63Yb09IbR/m 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_060020_425480_A83DA58A X-CRM114-Status: GOOD ( 22.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is the first step in replacing the old deprecated mechanism for initializing flash parameters and settings based on SFDP, with fallback to static parameters from struct flash_info. A dedicated SPI_NOR_TRY_SFDP flag is used to request this handling, where as the deprecated mechanism relies on the setting of either of the SPI_NOR_DUAL_READ, SPI_NOR_QUAD_READ, SPI_NOR_OCTAL_READ or SPI_NOR_OCTAL_DTR_READ bits. Compared to the deprecated mechanism, SPI_NOR_TRY_SFDP flags allow optional SFDP parsing for flashes where the fallback does not include dual/quad/octal read. This kind of mechanism is needed for flashes that reuses flash id from old non-SFDP flashes for newer flashes with SFDP, with different parameters and settings required. Macronix is known to reuse flash ids for replacement parts, so for those lines where the initial part did not have SFDP, this mechanism is needed. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/core.c | 49 ++++++++++++++-------------------------------- drivers/mtd/spi-nor/core.h | 35 ++++++++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 35 deletions(-) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 3e1f1913536b..39b28700ce28 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -2717,11 +2717,10 @@ static void spi_nor_manufacturer_init_params(struct spi_nor *nor) /** * spi_nor_no_sfdp_init_params() - Initialize the flash's parameters and - * settings based on nor->info->sfdp_flags. This method should be called only by - * flashes that do not define SFDP tables. If the flash supports SFDP but the - * information is wrong and the settings from this function can not be retrieved - * by parsing SFDP, one should instead use the fixup hooks and update the wrong - * bits. + * settings based on nor->info->sfdp_flags. This method is for flashes that do + * not define SFDP tables. If the flash supports SFDP but the information is + * wrong and the settings from this function can not be retrieved by parsing + * SFDP, one should instead use the fixup hooks and update the wrong bits. * @nor: pointer to a 'struct spi_nor'. */ static void spi_nor_no_sfdp_init_params(struct spi_nor *nor) @@ -2899,14 +2898,15 @@ static int spi_nor_late_init_params(struct spi_nor *nor) } /** - * spi_nor_sfdp_init_params_deprecated() - Deprecated way of initializing flash - * parameters and settings based on JESD216 SFDP standard. + * spi_nor_try_sfdp_init_params() - Try to initialize flash parameters and + * settings based on JESD216 SFDP standard, with fallback to pre-initialized + * flash parameters and settings if SFP parsing fails. * @nor: pointer to a 'struct spi_nor'. * * The method has a roll-back mechanism: in case the SFDP parsing fails, the * legacy flash parameters and settings will be restored. */ -static void spi_nor_sfdp_init_params_deprecated(struct spi_nor *nor) +static void spi_nor_try_sfdp_init_params(struct spi_nor *nor) { struct spi_nor_flash_parameter sfdp_params; @@ -2918,28 +2918,6 @@ static void spi_nor_sfdp_init_params_deprecated(struct spi_nor *nor) } } -/** - * spi_nor_init_params_deprecated() - Deprecated way of initializing flash - * parameters and settings. - * @nor: pointer to a 'struct spi_nor'. - * - * The method assumes that flash doesn't support SFDP so it initializes flash - * parameters in spi_nor_no_sfdp_init_params() which later on can be overwritten - * when parsing SFDP, if supported. - */ -static void spi_nor_init_params_deprecated(struct spi_nor *nor) -{ - spi_nor_no_sfdp_init_params(nor); - - spi_nor_manufacturer_init_params(nor); - - if (nor->info->no_sfdp_flags & (SPI_NOR_DUAL_READ | - SPI_NOR_QUAD_READ | - SPI_NOR_OCTAL_READ | - SPI_NOR_OCTAL_DTR_READ)) - spi_nor_sfdp_init_params_deprecated(nor); -} - /** * spi_nor_init_default_params() - Default initialization of flash parameters * and settings. Done for all flashes, regardless is they define SFDP tables @@ -3046,13 +3024,16 @@ static int spi_nor_init_params(struct spi_nor *nor) if (spi_nor_needs_sfdp(nor)) { ret = spi_nor_parse_sfdp(nor); if (ret) { - dev_err(nor->dev, "BFPT parsing failed. Please consider using SPI_NOR_SKIP_SFDP when declaring the flash\n"); + dev_err(nor->dev, "BFPT parsing failed. Please consider using SPI_NOR_SKIP_SFDP or SPI_NOR_TRY_SFDP when declaring the flash\n"); return ret; } - } else if (nor->info->no_sfdp_flags & SPI_NOR_SKIP_SFDP) { - spi_nor_no_sfdp_init_params(nor); } else { - spi_nor_init_params_deprecated(nor); + spi_nor_no_sfdp_init_params(nor); + if (!(nor->info->no_sfdp_flags & SPI_NOR_SKIP_SFDP)) + spi_nor_manufacturer_init_params(nor); + + if (spi_nor_try_sfdp(nor)) + spi_nor_try_sfdp_init_params(nor); } return spi_nor_late_init_params(nor); diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index 442786685515..dfc81716e068 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -485,9 +485,12 @@ struct spi_nor_id { * * @no_sfdp_flags: flags that indicate support that can be discovered via SFDP. * Used when SFDP tables are not defined in the flash. These - * flags are used together with the SPI_NOR_SKIP_SFDP flag. + * flags are used together with the SPI_NOR_SKIP_SFDP or + * SPI_NOR_TRY_SFDP flag. * SPI_NOR_SKIP_SFDP: skip parsing of SFDP tables. * SECT_4K: SPINOR_OP_BE_4K works uniformly. + * SPI_NOR_TRY_SFDP: try parsing SFDP tables before using the + * parameters specified in this struct. * SPI_NOR_DUAL_READ: flash supports Dual Read. * SPI_NOR_QUAD_READ: flash supports Quad Read. * SPI_NOR_OCTAL_READ: flash supports Octal Read. @@ -535,6 +538,7 @@ struct flash_info { u8 no_sfdp_flags; #define SPI_NOR_SKIP_SFDP BIT(0) #define SECT_4K BIT(1) +#define SPI_NOR_TRY_SFDP BIT(2) #define SPI_NOR_DUAL_READ BIT(3) #define SPI_NOR_QUAD_READ BIT(4) #define SPI_NOR_OCTAL_READ BIT(5) @@ -706,6 +710,35 @@ static inline bool spi_nor_needs_sfdp(const struct spi_nor *nor) return !nor->info->size; } +/** + * spi_nor_try_sfdp() - returns true if optional SFDP parsing should be tried + * for this flash, with fallback to static parameters and settings based on + * flash ID if SFDP parsing fails. + * + * Return: true if optional SFDP parsing should be tried + */ +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; +} + #ifdef CONFIG_DEBUG_FS void spi_nor_debugfs_register(struct spi_nor *nor); void spi_nor_debugfs_shutdown(void); From patchwork Thu Jul 11 13:00:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730680 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C4AD5C3DA49 for ; Thu, 11 Jul 2024 13:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=yWPnlogaHh1JsL53cSK4pYNGOrysHKRUndRnVu5uc+I=; b=31NDjc62JOq4Zdg8LR3gmPQZvN 4DT/NhSEM2rtFvUk+5A7szoTao3BsuG6dqa7iZXMA1d90Yl8QDOUtP4RGrMvi+rLhatHWDg8PYxVp UkEKaWzEFcf6FVoGpY8bPXzGRTUQZvDwmsI7YA4DhXHAgKS8KEqJPdMXl5jh7393mVzCW5W4/L2n8 ZOvhBHf5IDKmKmVrY03Lok38kFLPEWQzlB//fPiR5muMnjUUhhoFEG/9O582XFeJLlbTQCtw4aQf8 cI0Z6G4H2Ayame3FxCFw1/nU3I1LpJxb8jrLEJuO3hLdGxGqUj32EfaXOyZZtocb/LezORN5kNGFW sWfskieg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtRm-0000000E2x7-0dZL; Thu, 11 Jul 2024 13:02:54 +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 1sRtPL-0000000E1Wa-2CvM; Thu, 11 Jul 2024 13:00:25 +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=yWPnlogaHh1JsL53cSK4pYNGOrysHKRUndRnVu5uc+I=; b=qm2cgKsc04djIe+T+t/T4PrZAl XA/YTkOz03/j7brnLnj3eP3aKCF/Fy4OSk57EPv4HG5kUILHcftrj0UMK1SEqeJQvaNzWgNmuUlV1 q6cfglywoU/xSvwDT46pNPyIKwp0w4WhuXNZpzvcl6EhQJ/8oJsZ+wtJEpJab173wAqmGksEWr+W9 b97sMRyZgrWWkM+Q2ubkWgo8mwik7vG7GagS6Evq/b3p7L3mzHzIrvRnkeeiIkD/uqVIlUih2Tyjf 5fjHqOhDxVZ2vZcKw9GwU/LIxA4n/PBgeLAa/P4DVQgdtHszJj44GwSSFmKdXFc/QtHZ9i3kZEeHB mhtMMISg==; 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 1sRtPF-000BS8-Rl; Thu, 11 Jul 2024 15:00:17 +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 1sRtPF-00037C-2D; Thu, 11 Jul 2024 15:00:17 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:02 +0200 Subject: [PATCH v3 02/15] mtd: spi-nor: macronix: enable quad/dual speed for mx25l3205d chips MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-2-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=2314; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=JrPkztMV1oVuJInQdJCGTwXrnR2sny7JLQNFMwZiGqI=; b=jO03AmXp0U1Nh+VMBJv8f0MdVICx6OYPq8mRIR1HA6jgera3Lq58jHoP+eLaFtWBiMdB0nVmp bD+RRvKAFi1AidmK2ckr/aV7iqu0vDFS3tumjbHR/Qdy2gHt5QBTW92 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_060023_682381_013473E3 X-CRM114-Status: GOOD ( 15.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Macronix engineers apparantly do not understand the purpose of having an ID actually identify the chip and its capabilities. Sigh. The original Macronix SPI NOR flash that identifies itself as 0xC22016 with RDID was MX25L3205D. This chip does not support SFDP, but does support the 2READ command (1-2-2). When Macronix announced EoL for MX25L3205D, the recommended replacement part was MX25L3206E, which conveniently also identifies itself as 0xC22016. It does not support 2READ, but supports DREAD (1-1-2) instead, and supports SFDP for discovering this. When Macronix announced EoL for MX25L3206E, the recommended replacement part was MX25L3233F, which also identifies itself as 0xC22016. It supports DREAD, 2READ, and the quad modes QREAD (1-1-4) and 4READ (1-4-4). This also support SFDP. So far, all of these chips have been handled the same way by the Linux driver. The SFDP information have not been read, and no dual and quad read modes have been enabled. The trouble begins when we want to enable the faster read modes. The RDID command only return the same 3 bytes for all 3 chips, so that doesn't really help. Instead, we can use the SPI_NOR_TRY_SFDP flag, which forces the spi-nor system to try using SFDP, but fallback to the parameters specified in struct flash_info. This way, boards using MX25L3205D will continue as before this change. That is without taking advantage of the 1-2-2 that it supports. For MX25L3206E and MX25L3233F, the SFDP parameters are used, and they will therefore be using the optimal dual or quad mode supported by the flash and the SPI controller it is attached to. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/macronix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/macronix.c b/drivers/mtd/spi-nor/macronix.c index ea6be95e75a5..090f28e05a5d 100644 --- a/drivers/mtd/spi-nor/macronix.c +++ b/drivers/mtd/spi-nor/macronix.c @@ -61,7 +61,7 @@ static const struct flash_info macronix_nor_parts[] = { .id = SNOR_ID(0xc2, 0x20, 0x16), .name = "mx25l3205d", .size = SZ_4M, - .no_sfdp_flags = SECT_4K, + .no_sfdp_flags = SECT_4K | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc2, 0x20, 0x17), .name = "mx25l6405d", From patchwork Thu Jul 11 13:00:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730673 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5C53C3DA49 for ; Thu, 11 Jul 2024 13:00:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=XeZX/fN1JLnmI+FO4xROcdTsrgS/vV35tYbkT3yOVA8=; b=fhKoF1PtBD05iY196SFCB06wVs KmDOYlF+Q156tlrZ+qswDFpDxRdkuzvn5iRUEszOODH94IVgxNSg6Qapq7rV7dcKU68xocExe0Pop C6sE3UpbFef1Zck8tVfAC+Li/NBT4PvgdBrieuGMcww93HdhHqu2AbLMUQHqhPn5oTkaL4zPbczbl mD10I31jDgJNCFiYMmdbi0TB8MrDo25dRN60AWOtgq+1ycGdCIFsXPeWTDo8PGx4j76A6f1tFG8Jw CrOYpLRt9oWYAiWSE6IidHpCYv9843osd84AYAwB6m1YLU3/er7WK6PvWMjGvVFYL191fQgpFJBr+ S1eUT4SQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtPb-0000000E1cd-1g2I; Thu, 11 Jul 2024 13:00:39 +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 1sRtPI-0000000E1Ue-03nm; Thu, 11 Jul 2024 13:00:21 +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=XeZX/fN1JLnmI+FO4xROcdTsrgS/vV35tYbkT3yOVA8=; b=1EIEvOmvQ7ULVcq45LRry6nK+v VWNoV6X660XoREPEAEvVqgKdJ68SLIs6yKVHRwIOgq9d6avjydiTEOwFd9+9ds2HWkFYTdBY+qVCJ 4f2VRs1dG9MMp6DHEGCzSuIYTQZKu2JeelQZtDfR9e+ZFTsQBx5dzSgLN8linWJDHfgJNT8yC4Whs c/m6KpDD80YNKKl22TY0clTUz8JEsw1LdtlRVLVIBnDH0Fp1nYC3FAbFwoQqiSQFRXh9opvBzjpAw OxnXbMEmrjNaSJmD6F5ygxKJsUj6pSOzhYigSnwEZHhjwwC1ZbTfzXJzRN+kxyOzOj/ROEvA78AgE UR4K5seQ==; 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 1sRtPG-000BSC-IH; Thu, 11 Jul 2024 15:00:18 +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 1sRtPG-0003Cy-14; Thu, 11 Jul 2024 15:00:17 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:03 +0200 Subject: [PATCH v3 03/15] mtd: spi-nor: Align default_init() handling for SPI_NOR_SKIP_SFDP MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-3-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=1243; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=E9Xx4YsmdLPl9JM6Nb956eFYmxW+WJmiJqnM9qnOYgU=; b=iK/XDkcF02QhGwuqjgh2t6l5BJL/gsQcEG0/ScrlXESFe8xr/g+CctSmS5HLiXLNi/HxeDhFX 5CtBi7zMusPB9+er3muBMrXmcaN/Ifhs4E9uKWeaWXMdIXDmshi6FUW 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_060020_097257_C97052B9 X-CRM114-Status: GOOD ( 10.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently, flashes declared with size != 0 in struct flash_info and without SPI_NOR_SKIP_SFDP in no_sfdp_flags is initialized using struct flash_info. Flashes declared with size != 0 and SPI_NOR_SKIP_SFDP set is handled similarly, with the only difference being that the ->default_init() hooks is ignored. With the only in-tree user of SPI_NOR_SKIP_SFDP is the Spansion s25fl256s0 flash, which does not have either manufacturer or flash_info ->default_init() hooks, it should be safe to align this, so that they are handled in the same way. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 39b28700ce28..d58f107f62ec 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -3029,8 +3029,7 @@ static int spi_nor_init_params(struct spi_nor *nor) } } else { spi_nor_no_sfdp_init_params(nor); - if (!(nor->info->no_sfdp_flags & SPI_NOR_SKIP_SFDP)) - spi_nor_manufacturer_init_params(nor); + spi_nor_manufacturer_init_params(nor); if (spi_nor_try_sfdp(nor)) spi_nor_try_sfdp_init_params(nor); From patchwork Thu Jul 11 13:00:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730676 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2FE4C3DA49 for ; Thu, 11 Jul 2024 13:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=9ZrZJLS1DLB4jv/UMX2sL8nP6E/alEgCBVlU2XvWCHA=; b=sgCnXqZYvmbJ4ikPym7HKkZ+i1 n+65TUxC2aPVSyzz2MhUW/wCtVLEmm2utgXuFkqw3g12QlIifLLH9LUMVu5vBuQ7kOjDavtw+xQ5V FAk/qhze/UgWTVdA6Fmfl0G+CrZogb8yiZeA7OTt5w4ogfoauLCXQftRuLy8pf4dDzHvsYzrzljTM Y0R3nQwo/8+2zyCGLrh4zQ/xsnTEN37ymsykPHt29MwySlEazGbEYBfOaHw0AtiqX3+5Gvr8U5JmY /V3pwsFEQKgHULlIowXggx83vK1uYarUCicMEs3OpIFcP12IaMr0SomEJ7PdFfa086IkWJANFhSHG bV4xUv/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtQS-0000000E24i-1Lyl; Thu, 11 Jul 2024 13:01:32 +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 1sRtPI-0000000E1Uh-333q; Thu, 11 Jul 2024 13:00:23 +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=9ZrZJLS1DLB4jv/UMX2sL8nP6E/alEgCBVlU2XvWCHA=; b=z23R1L0o1zjmTbzlPIwov0PFJE lhi3iMgGLOiRExSNJDqSnTD3PDgq1PBhKeUKBvBvBmdCtPkWha60fArzZMVYNhoCeYponQcAQwnjJ lSEPGEtqRLnRVt2NZ6cxC9bCzl5DWPfv0ynlguI9P4SZcly/4e6xxRbw4VB0Gu8KI78eeeTpnIHV3 25Q9oreBwE0Ty/EF4Oob+TBLqJET/GWsoy/U5NSeOStw1PuGinvO8HIb5nNYbEnaTroeIUdt6gDX1 To60aVZIm7yM/zj7Qdzc5R2nHuGTrxde+R/MDNwgVYEawc7USc4PAn9cLgVtJy1/szkH1zUREV6gu J3Kke4uQ==; 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 1sRtPH-000BSd-6S; Thu, 11 Jul 2024 15:00:19 +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 1sRtPH-0003Iu-06; Thu, 11 Jul 2024 15:00:18 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:04 +0200 Subject: [PATCH v3 04/15] mtd: spi-nor: atmel: Use new SPI_NOR_TRY_SFDP flag MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-4-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=904; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=Ob5pJLtErmzw/PEIKu46fWtb7DMNCAxcd8QknAftFds=; b=6fpJfGaww/bYkfwhAzRE1TJ6E/AkqJ+9CFbDEezK6EgmHnXqdB0LfnfLFFgSoNyg5MTiHE6oh j3/VXzy6xVECOYw4rWOFcavu67K0J/sHILjlLRXjVwzy/w0zqWAFybe 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_060020_798248_9339FDAE X-CRM114-Status: GOOD ( 10.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This converts from the old (deprecated) implicit way of triggering an optional SFDP parse with fallback to the static configuration in the matching struct flash_info entry. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/atmel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/atmel.c b/drivers/mtd/spi-nor/atmel.c index 45d1153a04a0..cfd6a406b33a 100644 --- a/drivers/mtd/spi-nor/atmel.c +++ b/drivers/mtd/spi-nor/atmel.c @@ -175,7 +175,7 @@ static const struct flash_info atmel_nor_parts[] = { .id = SNOR_ID(0x1f, 0x42, 0x16), .name = "at25sl321", .size = SZ_4M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x1f, 0x44, 0x01), .name = "at25df041a", From patchwork Thu Jul 11 13:00:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730678 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9A9B3C3DA49 for ; Thu, 11 Jul 2024 13:02:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=d+8V3/rKaunu+zG+Ahpl7K1m4zxvyurqkU+URN+F9Hk=; b=1d+tL8TcjuBvE7L9t0VLdTctS3 ec9WYVb01qOGEpuxmbGnlQHnq2uzuXeAIr/ZIxY6YeTwX13fMG9c3gr80C8XKhhbJmQq20r8HptXd 2Bubo6f2gbUe8FwtE4DYxBYa8J3gxr3lbhF3SAF0EQ6tIIbuaSOrm6KQnHOPyCSHbD4erU8gVy3lE Cy6weYa+MZa3lByoj8gMoq1LWwDMb48nz4SY4eWzJcgxD+2EzO/EHz8fc0imyATbtQxf0Ii2z7rKp 60pl2QoRdllXN2o1ofpj1Flh0PUumkIYm9BR3asfGwymVDdvZK9cL2lI9BbsEo4ud5K2a7rXWJHeV GOi15NHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtR5-0000000E2Tk-1imP; Thu, 11 Jul 2024 13:02:11 +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 1sRtPJ-0000000E1Vf-2q8z; Thu, 11 Jul 2024 13:00:24 +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=d+8V3/rKaunu+zG+Ahpl7K1m4zxvyurqkU+URN+F9Hk=; b=mba9LSHjnOmPPJUiaW2yasyzp0 44oiDVzH1IhYeGMMPxR95O5L1ZbL0jQtQ/mZ+QHy9DIpvZCnCAUfET2OJdBM3AjnPOlktgB+SzQSA iDyqwQTbC45hXNmTv5+Zaq31N7cZuxYgQ5I7wDDz/M0eVt4Ab8DZWHmYC4608ULy0bO+kcFgnOJ2b v6PiFp3j0Nsgk0QP+cD3J0ic/uCbP2acI9vUcwuviZ0EM5QbBOn9ODg9UvkIXfG3p4aL2aV+P1p/V 25NJWrvWQYa5zI8Dv/JAv2joEpij/dbWIaIXhHChWDZmrDEGrSxscW5Vta5P6oveladSfBqjf+WUR UuByuKOg==; 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 1sRtPI-000BT5-3v; Thu, 11 Jul 2024 15:00:20 +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 1sRtPH-0003ON-2S; Thu, 11 Jul 2024 15:00:19 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:05 +0200 Subject: [PATCH v3 05/15] mtd: spi-nor: eon: Use new SPI_NOR_TRY_SFDP flag MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-5-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=1530; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=yDfyY8snkJSmluAtxiaEP/s2vlNRcQJPO6SAUBJaRIQ=; b=L3n3Tl5TJSue3j3s7PtAlTmOF8/qAmNf1K3er6bHO/RBI9LcjRtBeEuzJfswXoZFabE+FLt2W 9D4pUeTqnHpCq/UQX7TQExnpe6Edt4rJ3g2yPZQ+CbidyERSIj+R06D 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_060021_748853_7BFA5B51 X-CRM114-Status: GOOD ( 10.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This converts from the old (deprecated) implicit way of triggering an optional SFDP parse with fallback to the static configuration in the matching struct flash_info entry. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/eon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/spi-nor/eon.c b/drivers/mtd/spi-nor/eon.c index c1ddf662f782..0200e564f087 100644 --- a/drivers/mtd/spi-nor/eon.c +++ b/drivers/mtd/spi-nor/eon.c @@ -21,7 +21,7 @@ static const struct flash_info eon_nor_parts[] = { .id = SNOR_ID(0x1c, 0x30, 0x14), .name = "en25q80a", .size = SZ_1M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x1c, 0x30, 0x16), .name = "en25q32b", @@ -45,7 +45,7 @@ static const struct flash_info eon_nor_parts[] = { .id = SNOR_ID(0x1c, 0x70, 0x15), .name = "en25qh16", .size = SZ_2M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x1c, 0x70, 0x16), .name = "en25qh32", @@ -54,7 +54,7 @@ static const struct flash_info eon_nor_parts[] = { .id = SNOR_ID(0x1c, 0x70, 0x17), .name = "en25qh64", .size = SZ_8M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x1c, 0x70, 0x18), .name = "en25qh128", From patchwork Thu Jul 11 13:00:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730677 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9AC44C3DA49 for ; Thu, 11 Jul 2024 13:02:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=ppLgZmwRM8c0ykYORNd+WlBtKewamkLLMhiNg/fbsuE=; b=f5lODoLUuLOxfZ3RW86Rmw0Tn8 pbAs43WfU+NWchQ/W63lOEAoOvlaISVQjuyvF2+yUukUX+89e21jlGmH/gpXINzmDHxKAlLsz5HpQ nii4jsmq2uDh9bUGG3x4wUA7Pm+QURIEzJR5huEtpFBcXC0HaNVwMDeWqhAEs84itNRwqcyr2LNDg HyiRYp4CTk3MHSeS3TH2zsW4XowLI5LTOqdsYCqW8dLZ5QU8kkHSxu4EB7w5XeZ/vW5IzY4DlCfHe mv4VzWgstzbujIXjAJjoT7O6sgqnXparQre+rf4Fkj4YEOvt3rVCWcqnJQ1xZQI+LOuR/IfgYLcxv ly9M9NUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtQk-0000000E2GZ-0mts; Thu, 11 Jul 2024 13:01:50 +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 1sRtPK-0000000E1Vi-1UHH; Thu, 11 Jul 2024 13:00:23 +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=ppLgZmwRM8c0ykYORNd+WlBtKewamkLLMhiNg/fbsuE=; b=ZRhYbAib1qUkcon8Opsf/ifyr/ YdGWlMHigua8wC8qvfybG2XIK5K2am7oUnyVNX0jBu7XR7hQPCnM8ld8pEtsSM4abBmzs8yr75FIB 2sfRkehEg2qPOG1t6xB9SgzSn0ZTO5ITCc9lRozXl39V4VUZhoGBIdJVM5r+mWHGzzyVorsIMixdh 2rpq4F7U2X/TFHiHJpR9rCViec66pnDSRsSqkg6YpB/xnw3yiK2nB8i3ovo4/71Zq5Y2+QL6ci/M0 b+SQbfFtVlWYLbR1UG1rdZBviYe0b4DPPI8jb407BdwM3ZuQKu0gzLK3lL09NdQbOwcd2xaEqXH3l qyDL+aMQ==; 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 1sRtPI-000BTD-Q2; Thu, 11 Jul 2024 15:00:20 +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 1sRtPI-0003XS-21; Thu, 11 Jul 2024 15:00:20 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:06 +0200 Subject: [PATCH v3 06/15] mtd: spi-nor: gigadevice: Use new SPI_NOR_TRY_SFDP flag MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-6-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=3015; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=6MX4eIXlY3UWuzb6ohIZb1wVqVRypjimxT99p/j9DBc=; b=R+4tYMKNX3qUqddrsczMwsqlbiLfxg1IA2r7g6QcfsfYTa9tNVQ2bA2iIUTf1VjKNPrYf7Kp+ kEIMgmxqmCHDmqOOHNh6hffL5zJ0rRETZ/VdCnZ2naWjYDH3MvRJlCn 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_060022_528528_81EF7D27 X-CRM114-Status: UNSURE ( 9.77 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This converts from the old (deprecated) implicit way of triggering an optional SFDP parse with fallback to the static configuration in the matching struct flash_info entry. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/gigadevice.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/spi-nor/gigadevice.c b/drivers/mtd/spi-nor/gigadevice.c index ef1edd0add70..c0f2d74ede01 100644 --- a/drivers/mtd/spi-nor/gigadevice.c +++ b/drivers/mtd/spi-nor/gigadevice.c @@ -39,29 +39,29 @@ static const struct flash_info gigadevice_nor_parts[] = { .name = "gd25q16", .size = SZ_2M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc8, 0x40, 0x16), .name = "gd25q32", .size = SZ_4M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc8, 0x40, 0x17), .name = "gd25q64", .size = SZ_8M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc8, 0x40, 0x18), .name = "gd25q128", .size = SZ_16M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc8, 0x40, 0x19), .name = "gd25q256", - .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6, + .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6 | SPI_NOR_TRY_SFDP, .fixups = &gd25q256_fixups, .fixup_flags = SPI_NOR_4B_OPCODES, }, { @@ -69,19 +69,19 @@ static const struct flash_info gigadevice_nor_parts[] = { .name = "gd25lq32", .size = SZ_4M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc8, 0x60, 0x17), .name = "gd25lq64c", .size = SZ_8M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc8, 0x60, 0x18), .name = "gd25lq128d", .size = SZ_16M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, }; From patchwork Thu Jul 11 13:00:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730679 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58DB9C3DA41 for ; Thu, 11 Jul 2024 13:02:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=+KKqiIe0zAVzdlcV1iQJgODjeG08/S9xkthtZjiraRg=; b=utbdBupkx8JvtXqVYiZdTRCF0i 5/UxIXFEYJyYbLXGUUwsIGkg3BGM1KgB+YTgepRkaCAY6Q09sEI3bXZT//u5U5BRFRHUzuQWdzoV3 zGCBmhEyFsSyPRrodLQ3DZJscuiHpO/kbTBlhul0J1wUhX1J43SqZ7uNVFPg9uegD9ap/fWdyuTCi jh7h9nJ67lQHE0kVUfpW8a3tLBLwQvkkMiuPS+bTJ8cabLYJi7nRZWzCiR2upOMKpjNRMyToW1BbC vM1Lx+CbX+HChbkUnXfOLFus2mqR+KxdSOa2U+AQMxEpnmh0NCqRSfvY5AR6dZDK965KO/fsgCjrL 9QQIbCvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtRU-0000000E2lO-0smd; Thu, 11 Jul 2024 13:02:36 +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 1sRtPK-0000000E1W3-3tWG; Thu, 11 Jul 2024 13:00:24 +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=+KKqiIe0zAVzdlcV1iQJgODjeG08/S9xkthtZjiraRg=; b=LO+8NzSMUa0B01z926WP3iP0dh W6PemI2pS+Zl7n1EsQDbqHqLvjXq/DjC4L3P7z2nq1zShSlwqFRwOfvsQHurJM8PaepVyXssIZIH1 cpnWIqRWyfOdKpj8+0rsH7J8nLR7z7FSoYgO2M+ZuAoHANHox1kR64y6muOJj5AuYsAyuGwFhN640 74YGrJCyDMtrwZT518P17akLDRJJ9Ak1T/fLQxyU4xAGr4CUDsyR8/l4nBYX0T5PISpqbjeRP/Mju gKrgm1LmK3v/a9nQibIDwgVMINq9epxBxb6rLKd3TdY3jUiDgnm6e7ccgTVe/ZfCcUaxppjpQVVzO ZuXJqKTw==; 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 1sRtPJ-000BTR-Gh; Thu, 11 Jul 2024 15:00:21 +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 1sRtPJ-0003ci-0u; Thu, 11 Jul 2024 15:00:20 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:07 +0200 Subject: [PATCH v3 07/15] mtd: spi-nor: issi: Use new SPI_NOR_TRY_SFDP flag MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-7-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=2924; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=ZRmVQqdG+HwMnflnXqK8Hne0XXJ7bmicarecuxtLmbc=; b=gaG7Mtcl26BC8GhIEQZ7aWtgbhUzbNHEeYiqbJNLvhGEE4ky99WdyrXyOM7R/ZKrkAvPxQhuz sTz3IjkZueDC8Wu8/KhcG6dXzOc4WPa+KGeRalZTRedZCtVoV1wpt+Z 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_060023_013771_1058CCA7 X-CRM114-Status: UNSURE ( 9.06 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This converts from the old (deprecated) implicit way of triggering an optional SFDP parse with fallback to the static configuration in the matching struct flash_info entry. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/issi.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/mtd/spi-nor/issi.c b/drivers/mtd/spi-nor/issi.c index 18d9a00aa22e..7867489e214a 100644 --- a/drivers/mtd/spi-nor/issi.c +++ b/drivers/mtd/spi-nor/issi.c @@ -74,32 +74,32 @@ static const struct flash_info issi_nor_parts[] = { .id = SNOR_ID(0x9d, 0x40, 0x13), .name = "is25lq040b", .size = SZ_512K, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x9d, 0x60, 0x14), .name = "is25lp080d", .size = SZ_1M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x9d, 0x60, 0x15), .name = "is25lp016d", .size = SZ_2M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x9d, 0x60, 0x16), .name = "is25lp032", .size = SZ_4M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x9d, 0x60, 0x17), .name = "is25lp064", .size = SZ_8M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x9d, 0x60, 0x18), .name = "is25lp128", .size = SZ_16M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x9d, 0x60, 0x19), .name = "is25lp256", @@ -109,17 +109,17 @@ static const struct flash_info issi_nor_parts[] = { .id = SNOR_ID(0x9d, 0x70, 0x16), .name = "is25wp032", .size = SZ_4M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x9d, 0x70, 0x17), .size = SZ_8M, .name = "is25wp064", - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x9d, 0x70, 0x18), .name = "is25wp128", .size = SZ_16M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x9d, 0x70, 0x19), .name = "is25wp256", From patchwork Thu Jul 11 13:00:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730681 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 417B6C3DA49 for ; Thu, 11 Jul 2024 13:03:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=1gViG0Am9XFir/+Rywn/yPhuXM8ueFi7r8F4u7hLGcU=; b=slY66F/7YNamoQWYoCtbM5IvXA A75T60xQTMNVwYQ0ivtCIiz8i0NnQFlWiKrZm5+gtS81RF/fAwe5Y856nh1QoBS3CBsffOVwjn4pu WnXndiaGBy893GCgwT2VOYrXngH2TUla0dsosXrf4KMVOkEzagXUkQs5vHsydREmQa0Z5JKq9MgbE 9dNPVJFWJM0dz8fz90XS5pKicPAw00Jqv8rWxkghr09DkxpGbFCZFB/Odz/3WRv+SsW6iyZD9KAn3 I9FapaEjpjiG/G0eNFPM4O7Q33+cifAEuiT5h7W3yUa0EYoB1rlPnBNGmV4GSWIXjL5WpGb0tmUBI K1Y1yyGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtSC-0000000E3GW-0wE9; Thu, 11 Jul 2024 13:03:20 +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 1sRtPL-0000000E1Wc-2LWq; Thu, 11 Jul 2024 13:00:25 +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=1gViG0Am9XFir/+Rywn/yPhuXM8ueFi7r8F4u7hLGcU=; b=r9PHbn2iadCNsW8/DN/aTa1lh7 LMiIiCF0E0EEQsWxkvrbf3AEbP5g0qraIE1dPACZc0qk44Yh+uNYvPtnoMA7t1IV3lG7tbhYL6HpM LJ4KZLCOvVedSXiU8pqqNfuhP0816lPZ9tXWFfCIW7ZQqXHKU0qBPxZinuXXY0WRt/n/AmaMomeUt ZymDUbeobDl+x0ugoMwVx+idnlLcAc0P+FuqFHGZ2SykspPCUiDKQ47DPQ9717M324dPoIbNZP+WP MRDPTgbZcA98P5dP3d99y62GUGKseNQi5/a9sl7kwBjm2uqJKgLwsnmkmJ1VOAVaoUy811VsBXokw M+B7j2sg==; 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 1sRtPK-000BTb-4j; Thu, 11 Jul 2024 15:00:22 +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 1sRtPJ-0003hl-2w; Thu, 11 Jul 2024 15:00:21 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:08 +0200 Subject: [PATCH v3 08/15] mtd: spi-nor: macronix: Use new SPI_NOR_TRY_SFDP flag MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-8-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=4335; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=tSRHJerrgIY/xhP42g5Z+NiohX0lf8pP4THxPt55rtI=; b=POonLqbqEcbbcx3n9p07EI157zH05Ksrj6WAkr7zW1glmn8qp4PctNakp1ER7wxdUQzL5brsR ldgQ642NXXAB2a4LC3M2acfCgo7nLhQUi3jOOCFqHE6dT681NYWq9g2 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_060023_727139_4BA9BC13 X-CRM114-Status: UNSURE ( 9.55 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This converts from the old (deprecated) implicit way of triggering an optional SFDP parse with fallback to the static configuration in the matching struct flash_info entry. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/macronix.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/mtd/spi-nor/macronix.c b/drivers/mtd/spi-nor/macronix.c index 090f28e05a5d..d31abdbe916f 100644 --- a/drivers/mtd/spi-nor/macronix.c +++ b/drivers/mtd/spi-nor/macronix.c @@ -77,24 +77,24 @@ static const struct flash_info macronix_nor_parts[] = { .id = SNOR_ID(0xc2, 0x20, 0x19), .name = "mx25l25635e", .size = SZ_32M, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .fixups = &mx25l25635_fixups }, { .id = SNOR_ID(0xc2, 0x20, 0x1a), .name = "mx66l51235f", .size = SZ_64M, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .fixup_flags = SPI_NOR_4B_OPCODES, }, { .id = SNOR_ID(0xc2, 0x20, 0x1b), .name = "mx66l1g45g", .size = SZ_128M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc2, 0x23, 0x14), .name = "mx25v8035f", .size = SZ_1M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc2, 0x25, 0x32), .name = "mx25u2033e", @@ -114,7 +114,7 @@ static const struct flash_info macronix_nor_parts[] = { .id = SNOR_ID(0xc2, 0x25, 0x36), .name = "mx25u3235f", .size = SZ_4M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc2, 0x25, 0x37), .name = "mx25u6435f", @@ -124,7 +124,7 @@ static const struct flash_info macronix_nor_parts[] = { .id = SNOR_ID(0xc2, 0x25, 0x38), .name = "mx25u12835f", .size = SZ_16M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc2, 0x25, 0x39), .name = "mx25u25635f", @@ -135,19 +135,19 @@ static const struct flash_info macronix_nor_parts[] = { .id = SNOR_ID(0xc2, 0x25, 0x3a), .name = "mx25u51245g", .size = SZ_64M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .fixup_flags = SPI_NOR_4B_OPCODES, }, { .id = SNOR_ID(0xc2, 0x25, 0x3a), .name = "mx66u51235f", .size = SZ_64M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .fixup_flags = SPI_NOR_4B_OPCODES, }, { .id = SNOR_ID(0xc2, 0x25, 0x3c), .name = "mx66u2g45g", .size = SZ_256M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .fixup_flags = SPI_NOR_4B_OPCODES, }, { .id = SNOR_ID(0xc2, 0x26, 0x18), @@ -161,17 +161,17 @@ static const struct flash_info macronix_nor_parts[] = { .id = SNOR_ID(0xc2, 0x26, 0x1b), .name = "mx66l1g55g", .size = SZ_128M, - .no_sfdp_flags = SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc2, 0x28, 0x15), .name = "mx25r1635f", .size = SZ_2M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc2, 0x28, 0x16), .name = "mx25r3235f", .size = SZ_4M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xc2, 0x81, 0x3a), .name = "mx25uw51245g", From patchwork Thu Jul 11 13:00:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730683 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00704C3DA41 for ; Thu, 11 Jul 2024 13:04:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=6Udo75OjxMB/GImXQS4AFYjVsw/wVAePEtyqQJPRUb4=; b=VLLr50TPpe4LrjSonk2z56P/9N K49zNMsMpEaIEPe6EopAq7Nrg59XMmuDWlZlIEFier3DAyFa9hWwUaK1eXhLtkSWVO3OxQiXoNDd8 fXcea1F/AjNNA58PtXRE20Tbf/ybMhvV3xHjCFy4ByWjj5pIvh4PEKrj2LeWXsAh+4FucxClE6Fjy BCT2fSZxIHLEH5nTWAmzLv2rK5Apa5USzPRGCmqCRFKW6MMhxeRDxGByRqUG5/800vSH63mK2njzc zSKGfIkm8uEXY/oxKQS/194s31sf/LqLzl42WBHnua5qhOEAXp26hQy5zeNaD2LUyTYtS2wQiPMAG goV9gvcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtSe-0000000E3Zj-1fC0; Thu, 11 Jul 2024 13:03:48 +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 1sRtPR-0000000E1YN-0i6k; Thu, 11 Jul 2024 13:00:30 +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=6Udo75OjxMB/GImXQS4AFYjVsw/wVAePEtyqQJPRUb4=; b=NJAPg+nu9OiKm4SUoX2pf7ZF0g 5QQNBl7mPeyukQ7zWMWyoY/WKkwUBzp/l+SewpZkbAOH60X4S6Dd7GuPpFX2eyQDn5FLwuvYZXOmj ChuLz7+vYYeGGfqI6Z86MdlftUNDWfYsfGM/QW8LYXqvzI17oFFdRnYmQFbf1mhOUit3sJtgeIrgX 3Fxb0eMam7Ecoww4STzELhmr4MS+PpK51po6Y/Fo2Qap2fqpCmzzY9/OaNTulWGmp2fMfk4+aYR2+ NDEnIupBPOM2ENS66bZVy9i+0AmPI1V1aiTUR2iFkbJGeukGQOIYc9BVx5RTZK6t3W9LMUBOU4Pj/ WVeaptPg==; 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 1sRtPP-000BVF-Mo; Thu, 11 Jul 2024 15:00:27 +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 1sRtPP-0003my-1c; Thu, 11 Jul 2024 15:00:27 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:09 +0200 Subject: [PATCH v3 09/15] mtd: spi-nor: micron-st: Use new SPI_NOR_TRY_SFDP flag MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-9-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=6842; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=8gRxmjbNJOt6+hI1qXw+SxmSI/YFHve+jCyTXkZDUNI=; b=xaFoGar83fLOcfyMUbhb096+1G1ELXt+OevuCtRGTnEF+V+0NY7avO0ZwWxCcb7qt/1kcl8UG zeAl5FRakuYCm30WJ0mfrYOnw/5K5FmAKd9WwFF9Bs5PuC+g5BUIZfJ 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_060029_387567_F9AA3225 X-CRM114-Status: GOOD ( 10.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This converts from the old (deprecated) implicit way of triggering an optional SFDP parse with fallback to the static configuration in the matching struct flash_info entry. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/micron-st.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c index 3c6499fdb712..c40e02b4f030 100644 --- a/drivers/mtd/spi-nor/micron-st.c +++ b/drivers/mtd/spi-nor/micron-st.c @@ -166,7 +166,8 @@ static const struct flash_info micron_nor_parts[] = { .sector_size = SZ_128K, .size = SZ_64M, .no_sfdp_flags = SECT_4K | SPI_NOR_OCTAL_READ | - SPI_NOR_OCTAL_DTR_READ | SPI_NOR_OCTAL_DTR_PP, + SPI_NOR_OCTAL_DTR_READ | SPI_NOR_OCTAL_DTR_PP | + SPI_NOR_TRY_SFDP, .mfr_flags = USE_FSR, .fixup_flags = SPI_NOR_4B_OPCODES | SPI_NOR_IO_MODE_EN_VOLATILE, .fixups = &mt35xu512aba_fixups, @@ -175,7 +176,7 @@ static const struct flash_info micron_nor_parts[] = { .name = "mt35xu02g", .sector_size = SZ_128K, .size = SZ_256M, - .no_sfdp_flags = SECT_4K | SPI_NOR_OCTAL_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_OCTAL_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_FSR, .fixup_flags = SPI_NOR_4B_OPCODES, }, @@ -364,38 +365,38 @@ static const struct flash_info st_nor_parts[] = { .id = SNOR_ID(0x20, 0xba, 0x16), .name = "n25q032", .size = SZ_4M, - .no_sfdp_flags = SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x20, 0xba, 0x17), .name = "n25q064", .size = SZ_8M, - .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x20, 0xba, 0x18), .name = "n25q128a13", .size = SZ_16M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6, - .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_FSR, }, { .id = SNOR_ID(0x20, 0xba, 0x19, 0x10, 0x44, 0x00), .name = "mt25ql256a", .size = SZ_32M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .fixup_flags = SPI_NOR_4B_OPCODES, .mfr_flags = USE_FSR, }, { .id = SNOR_ID(0x20, 0xba, 0x19), .name = "n25q256a", .size = SZ_32M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_FSR, }, { .id = SNOR_ID(0x20, 0xba, 0x20, 0x10, 0x44, 0x00), .name = "mt25ql512a", .size = SZ_64M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .fixup_flags = SPI_NOR_4B_OPCODES, .mfr_flags = USE_FSR, }, { @@ -404,7 +405,7 @@ static const struct flash_info st_nor_parts[] = { .size = SZ_64M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6, - .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_FSR, }, { .id = SNOR_ID(0x20, 0xba, 0x21), @@ -412,38 +413,38 @@ static const struct flash_info st_nor_parts[] = { .size = SZ_128M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6, - .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_FSR, .fixups = &n25q00_fixups, }, { .id = SNOR_ID(0x20, 0xba, 0x22), .name = "mt25ql02g", .size = SZ_256M, - .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_FSR, .fixups = &mt25q02_fixups, }, { .id = SNOR_ID(0x20, 0xbb, 0x15), .name = "n25q016a", .size = SZ_2M, - .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x20, 0xbb, 0x16), .name = "n25q032a", .size = SZ_4M, - .no_sfdp_flags = SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x20, 0xbb, 0x17), .name = "n25q064a", .size = SZ_8M, - .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x20, 0xbb, 0x18), .name = "n25q128a11", .size = SZ_16M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6, - .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_FSR, }, { .id = SNOR_ID(0x20, 0xbb, 0x19, 0x10, 0x44, 0x00), @@ -451,14 +452,14 @@ static const struct flash_info st_nor_parts[] = { .size = SZ_32M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .fixup_flags = SPI_NOR_4B_OPCODES, .mfr_flags = USE_FSR, }, { .id = SNOR_ID(0x20, 0xbb, 0x19), .name = "n25q256ax1", .size = SZ_32M, - .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_FSR, }, { .id = SNOR_ID(0x20, 0xbb, 0x20, 0x10, 0x44, 0x00), @@ -473,7 +474,7 @@ static const struct flash_info st_nor_parts[] = { .size = SZ_64M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6, - .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_FSR, }, { .id = SNOR_ID(0x20, 0xbb, 0x21, 0x10, 0x44, 0x00), @@ -484,14 +485,14 @@ static const struct flash_info st_nor_parts[] = { .id = SNOR_ID(0x20, 0xbb, 0x21), .name = "n25q00a", .size = SZ_128M, - .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_FSR, .fixups = &n25q00_fixups, }, { .id = SNOR_ID(0x20, 0xbb, 0x22), .name = "mt25qu02g", .size = SZ_256M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_FSR, .fixups = &mt25q02_fixups, } From patchwork Thu Jul 11 13:00:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730684 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3B47CC3DA41 for ; Thu, 11 Jul 2024 13:04:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=7IfeIKnf8bb4+3ONceR0JYXiJvxgBdavyiSexx2x3/E=; b=M+Yv9Heyb6p2kIcfxpypm/z0rN DOSrZQj1o6vIZ+V0Ouvo6M86002t4YHTznDxxg5aQLAsMfh34EkqCQMqwbRSkpXRKpKhb/QylMOm/ M3gB3ywkLr069gSGAKiVBqf/D4sIsOdGcD/KzhGShPVTHkAL8omlFk1dx085eHdbl7Vp9JDsj8ntu ZvHxGrj2JERbcuviVwZyJsJYnzYxSF9dUO9C8Bd4Xu5CqOx2wlhzTl5IO4vR9SzT9VPbyk9qWZArf BMPVg5EmhlQMhA5Dw7Tv48Wym7ATMWiiFrLMtrtCqlodFsxDeLIpxwM6VpMugObqU9u6MSGThmid7 Q2KioXUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtSv-0000000E3iq-0Svp; Thu, 11 Jul 2024 13:04:05 +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 1sRtPR-0000000E1YU-3EDE; Thu, 11 Jul 2024 13:00:31 +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=7IfeIKnf8bb4+3ONceR0JYXiJvxgBdavyiSexx2x3/E=; b=CSxwaAAbj32Y+GsD6BG2MpjGGS HKL/j4+VK7/NNfUXdhBMzMtl5w3nBpZE6p75ciCERwR8ojpGE7z+Ou4X8g+gJKqfmoeW8/InYzImg 0dbWiv3ZUut2ZXmmJtb1lExRSN33VmBxkTY85W6By/ba7UcxGDTyg3fDoA8dghBtHeWQjQN4UoUpM KzresWG90ll7T2O/MYx1fkrp/W862j5CrUrrDRswGHsZh10jcYPTI3GYDK6Up8hfygZ9uIc67YNci k86bQUhXNK4cU33YWxbFCJxGa3t2inuuBoiiAxy8JKzv79eXWJ+1OnYXOPfpANNRFRzUc4p60NYhi Wir3vFjQ==; 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 1sRtPQ-000BVR-CG; Thu, 11 Jul 2024 15:00:28 +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 1sRtPQ-0004aF-0S; Thu, 11 Jul 2024 15:00:27 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:10 +0200 Subject: [PATCH v3 10/15] mtd: spi-nor: spansion: Use new SPI_NOR_TRY_SFDP flag MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-10-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=7219; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=fAIpiW/bdt8BU9xFIQGA8empyKumWS0/y9ClBynUg70=; b=exjvJVt+ssM+J2waBaGaAT5g6AHzwq1ZKSYzDh24d228YMqcvW2cBp2EXGuNOYNE5fE+xMngx a01LEHK3myxALe3mDmFZEU1A47TdR0DLlyCgPMygU8SSgOlah5EJqat 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_060029_995931_7512F885 X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This converts from the old (deprecated) implicit way of triggering an optional SFDP parse with fallback to the static configuration in the matching struct flash_info entry. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/spansion.c | 44 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c index 6cc237c24e07..a58c0229003d 100644 --- a/drivers/mtd/spi-nor/spansion.c +++ b/drivers/mtd/spi-nor/spansion.c @@ -774,7 +774,7 @@ static const struct flash_info spansion_nor_parts[] = { .id = SNOR_ID(0x01, 0x02, 0x15, 0x4d, 0x00), .name = "s25sl032p", .size = SZ_4M, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x01, 0x02, 0x15), .name = "s25sl032a", @@ -783,7 +783,7 @@ static const struct flash_info spansion_nor_parts[] = { .id = SNOR_ID(0x01, 0x02, 0x16, 0x4d, 0x00), .name = "s25sl064p", .size = SZ_8M, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x01, 0x02, 0x16), .name = "s25sl064a", @@ -800,19 +800,19 @@ static const struct flash_info spansion_nor_parts[] = { .name = "s25fs256s0", .size = SZ_32M, .sector_size = SZ_256K, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_CLSR, }, { .id = SNOR_ID(0x01, 0x02, 0x19, 0x4d, 0x01, 0x80), .name = "s25fl256s1", .size = SZ_32M, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_CLSR, }, { .id = SNOR_ID(0x01, 0x02, 0x19, 0x4d, 0x01, 0x81), .name = "s25fs256s1", .size = SZ_32M, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_CLSR, }, { .id = SNOR_ID(0x01, 0x02, 0x20, 0x4d, 0x00, 0x80), @@ -820,14 +820,14 @@ static const struct flash_info spansion_nor_parts[] = { .size = SZ_64M, .sector_size = SZ_256K, .flags = SPI_NOR_HAS_LOCK, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_CLSR, }, { .id = SNOR_ID(0x01, 0x02, 0x20, 0x4d, 0x00, 0x81), .name = "s25fs512s", .size = SZ_64M, .sector_size = SZ_256K, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_CLSR, .fixups = &s25fs_s_nor_fixups, }, { @@ -844,49 +844,49 @@ static const struct flash_info spansion_nor_parts[] = { .name = "s25fl128s0", .size = SZ_16M, .sector_size = SZ_256K, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_CLSR, }, { .id = SNOR_ID(0x01, 0x20, 0x18, 0x4d, 0x00), .name = "s25fl129p0", .size = SZ_16M, .sector_size = SZ_256K, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_CLSR, }, { .id = SNOR_ID(0x01, 0x20, 0x18, 0x4d, 0x01, 0x80), .name = "s25fl128s1", .size = SZ_16M, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_CLSR, }, { .id = SNOR_ID(0x01, 0x20, 0x18, 0x4d, 0x01, 0x81), .name = "s25fs128s1", .size = SZ_16M, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_CLSR, .fixups = &s25fs_s_nor_fixups, }, { .id = SNOR_ID(0x01, 0x20, 0x18, 0x4d, 0x01), .name = "s25fl129p1", .size = SZ_16M, - .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .mfr_flags = USE_CLSR, }, { .id = SNOR_ID(0x01, 0x40, 0x13), .name = "s25fl204k", .size = SZ_512K, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x01, 0x40, 0x14), .name = "s25fl208k", .size = SZ_1M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x01, 0x40, 0x15), .name = "s25fl116k", .size = SZ_2M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x01, 0x40, 0x16), .name = "s25fl132k", @@ -901,19 +901,19 @@ static const struct flash_info spansion_nor_parts[] = { .id = SNOR_ID(0x01, 0x60, 0x17), .name = "s25fl064l", .size = SZ_8M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .fixup_flags = SPI_NOR_4B_OPCODES, }, { .id = SNOR_ID(0x01, 0x60, 0x18), .name = "s25fl128l", .size = SZ_16M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .fixup_flags = SPI_NOR_4B_OPCODES, }, { .id = SNOR_ID(0x01, 0x60, 0x19), .name = "s25fl256l", .size = SZ_32M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .fixup_flags = SPI_NOR_4B_OPCODES, }, { .id = SNOR_ID(0x04, 0x2c, 0xc2, 0x7f, 0x7f, 0x7f), @@ -985,22 +985,22 @@ static const struct flash_info spansion_nor_parts[] = { .id = SNOR_ID(0xef, 0x40, 0x13), .name = "s25fl004k", .size = SZ_512K, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x40, 0x14), .name = "s25fl008k", .size = SZ_1M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x40, 0x15), .name = "s25fl016k", .size = SZ_2M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x40, 0x17), .name = "s25fl064k", .size = SZ_8M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, } }; From patchwork Thu Jul 11 13:00:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730685 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 84CFAC3DA49 for ; Thu, 11 Jul 2024 13:04:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=Iaiuq01WZqY1WjmLd9MSC9VUF3H2g1ho967hHMq1cSs=; b=O3xL4zrt7YbSdTtFXouanGQ33S dHoQvUzR/B3JAP/jsSxzF0Q6DUpHoRwsiMY1AoC5HpuAlBZWZ9P8CeShYc013joo3uPGuCx+zuvUR VEjE8ba1gF9cPmnE79mhMhOS8ArxqRjnPshELiNWRwzwpCLDTOiHn2kx16gCdjoh6lMDY6hSBA9kh hk2jed2xCpyqmlNRhLJ14bloZ6A9VwZXxmq2PrtawI2zf6Fm487O5JpUlf2vcsZY1svYemqe2mr5H RvsxJJ6J+qwUVGGIoAN7BFBaprKohFJox/hCwGtKR4ZyfQrhd/3s3eowjM2FKar3Sd/flGw9St5t7 dPRKFNcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtTG-0000000E3xA-3AVd; Thu, 11 Jul 2024 13:04:26 +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 1sRtPS-0000000E1Yn-1IOn; Thu, 11 Jul 2024 13:00:31 +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=Iaiuq01WZqY1WjmLd9MSC9VUF3H2g1ho967hHMq1cSs=; b=lNMTe/g+MPV27Y9bXCVzRVwFyy Pk7fyTn3D8N6rxdGkyx4xsUU0c426emWxGcBgJThXWQf9wd0KqBw3kfZq3f4Fc+bLlTh6hQdmcojX nd2C8wiK02xcBn90n1LwfgXXKBTx6T2/e/okYN80vytpdG0Pb0DgNnKeqTAA3M5y5sDN6mQ+Obt1H PlqeINYoX+kuS586+pTkugm/DrTe7lJQ2mX3PEK2OVOOJ41d7N7uxxu5gG4pNHjnYFYxLK3g4D1Fq bQDpI+w8U54BEcdqARDg2jFby0lP5Vy4l78jCY8DvTPNAcfm5guQ/ADYp9feglW2H31jK6UpSvj3c XIT7sLbQ==; 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 1sRtPQ-000BVs-U8; Thu, 11 Jul 2024 15:00:28 +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 1sRtPQ-0004e5-2M; Thu, 11 Jul 2024 15:00:28 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:11 +0200 Subject: [PATCH v3 11/15] mtd: spi-nor: sst: Use new SPI_NOR_TRY_SFDP flag MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-11-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=1495; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=ljG3r26u3NWW/rRWWrTsFxrJ5qKb4+lQAH18feZYI74=; b=kuHOxZiK5BJO4gpOctj5rGZOrOg18d08fVjYk3yinG0AKzGrCIgyMRc89GYjVMEljgg4zK3eE Yc+x6CYl0FhC38EMd56YnQrydnA7l9yLh0sblAlMTAAolHceQo45Pl0 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_060030_384297_96BE3BB7 X-CRM114-Status: GOOD ( 10.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This converts from the old (deprecated) implicit way of triggering an optional SFDP parse with fallback to the static configuration in the matching struct flash_info entry. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/sst.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/spi-nor/sst.c b/drivers/mtd/spi-nor/sst.c index 180b7390690c..bfebef62dd36 100644 --- a/drivers/mtd/spi-nor/sst.c +++ b/drivers/mtd/spi-nor/sst.c @@ -146,7 +146,7 @@ static const struct flash_info sst_nor_parts[] = { .id = SNOR_ID(0xbf, 0x26, 0x41), .name = "sst26vf016b", .size = SZ_2M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xbf, 0x26, 0x42), .name = "sst26vf032b", @@ -157,13 +157,13 @@ static const struct flash_info sst_nor_parts[] = { .name = "sst26vf064b", .size = SZ_8M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .fixups = &sst26vf_nor_fixups, }, { .id = SNOR_ID(0xbf, 0x26, 0x51), .name = "sst26wf016b", .size = SZ_2M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, } }; From patchwork Thu Jul 11 13:00:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730688 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3BEF6C3DA49 for ; Thu, 11 Jul 2024 13:06:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=IK4l41sD/FRDaezgs+l6z4765eA6ACLdhNcpzaUhaU0=; b=0K3zUvaTZe66cuRdZqfP3udzHh NvKUgyqcFqEn4aeheLMzQt7gMMrVdHnk4UDAo4MijnBdxQwMwXGY1tQzMwZUEmhItg/aP6qo0W1KA 7ZrlIgAzidP4u0y+GCCYUG1hD91FotkBLOwMn6H0pC6MMxZzIrHHihBS2QWWfrRiY5UfSMjopIXDV G90vlUkPCF4/E9MjbG0cssEXYFI59hawdmqElBuRxR6W43Q36oSF26T91ic9o99CMgAnwtYOwJvUw LZiUOGeaptxGfSrgysNhD0nTgZ+AHO25PekmO6UVYCmRIFitOncdc9dynAKBn2WCQxu6+UxNS/x9s NMrXOLBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtUh-0000000E4pg-1Ecb; Thu, 11 Jul 2024 13:05:55 +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 1sRtPY-0000000E1aG-0BQE; Thu, 11 Jul 2024 13:00:37 +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=IK4l41sD/FRDaezgs+l6z4765eA6ACLdhNcpzaUhaU0=; b=S7gsYmEGwhnqosGOr57AECD2fi c1UrjS+gt2lCId6ZyjVDCyVYX6mh6a7jDNYsICGMdZ0IVTmVBL6SSSVix9vg/caysBtPbIp8VJ7Y8 hFFZOosD9C2HhNYa7QgaC7VQwQjXuMI8lHDKXzaOPGtGSn80N5gZFBaisXiWOr0cB8IvoSxS6rO3O 5NgP5Dtq1vzG47rVkQzAdypp6VOpOpLPyz789w0PbB1deh+BopqaNQX3Wf0rB5t5O1GghFvF8Wrfd Iixyn+MRGetiVPsNQksyiPIYHskNOnWEflUDXCC8aWTC+SDPx8Ybd8po6xbIvvvY2eM324da8/ebE AjVa0SJA==; 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 1sRtPW-000BX5-JU; Thu, 11 Jul 2024 15:00:34 +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 1sRtPW-0004iJ-1F; Thu, 11 Jul 2024 15:00:33 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:12 +0200 Subject: [PATCH v3 12/15] mtd: spi-nor: winbond: Use new SPI_NOR_TRY_SFDP flag MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-12-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=5913; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=rW3a7ipFPyWa9DZI305j2H7A6+s/aEtUMkP08XIBa2Y=; b=/ZXrx04LhEavsH5lGJMhRg3brHTT4chz7hClrZGAFV7ZMK0lktR35hBwhgaH0kmi3/d9bPZ5F jMr2vpwsPUXDVf86NNVcaGQP+yw3IpJvopo6jRWEqXw030ZnazYFG1R 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_060036_271810_385A8986 X-CRM114-Status: UNSURE ( 9.01 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This converts from the old (deprecated) implicit way of triggering an optional SFDP parse with fallback to the static configuration in the matching struct flash_info entry. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/winbond.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c index 142fb27b2ea9..42160257e270 100644 --- a/drivers/mtd/spi-nor/winbond.c +++ b/drivers/mtd/spi-nor/winbond.c @@ -101,7 +101,7 @@ static const struct flash_info winbond_nor_parts[] = { .id = SNOR_ID(0xef, 0x40, 0x17), .name = "w25q64", .size = SZ_8M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x40, 0x18), .name = "w25q128", @@ -110,13 +110,13 @@ static const struct flash_info winbond_nor_parts[] = { .id = SNOR_ID(0xef, 0x40, 0x19), .name = "w25q256", .size = SZ_32M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .fixups = &w25q256_fixups, }, { .id = SNOR_ID(0xef, 0x40, 0x20), .name = "w25q512jvq", .size = SZ_64M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x50, 0x12), .name = "w25q20bw", @@ -137,31 +137,31 @@ static const struct flash_info winbond_nor_parts[] = { .name = "w25q16dw", .size = SZ_2M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x60, 0x16), .name = "w25q32dw", .size = SZ_4M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .otp = SNOR_OTP(256, 3, 0x1000, 0x1000), }, { .id = SNOR_ID(0xef, 0x60, 0x17), .name = "w25q64dw", .size = SZ_8M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x60, 0x18), .name = "w25q128fw", .size = SZ_16M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x60, 0x19), .name = "w25q256jw", .size = SZ_32M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x60, 0x20), .name = "w25q512nwq", @@ -171,13 +171,13 @@ static const struct flash_info winbond_nor_parts[] = { .name = "w25q16jv-im/jm", .size = SZ_2M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x70, 0x16), .name = "w25q32jv", .size = SZ_4M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x70, 0x17), .name = "w25q64jvm", @@ -188,7 +188,7 @@ static const struct flash_info winbond_nor_parts[] = { .name = "w25q128jv", .size = SZ_16M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x70, 0x19), .name = "w25q256jvm", @@ -196,32 +196,32 @@ static const struct flash_info winbond_nor_parts[] = { .id = SNOR_ID(0xef, 0x71, 0x19), .name = "w25m512jv", .size = SZ_64M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x80, 0x16), .name = "w25q32jwm", .size = SZ_4M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, .otp = SNOR_OTP(256, 3, 0x1000, 0x1000), }, { .id = SNOR_ID(0xef, 0x80, 0x17), .name = "w25q64jwm", .size = SZ_8M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x80, 0x18), .name = "w25q128jwm", .size = SZ_16M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x80, 0x19), .name = "w25q256jwm", .size = SZ_32M, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0xef, 0x80, 0x20), .name = "w25q512nwm", From patchwork Thu Jul 11 13:00:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730689 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6BF33C3DA41 for ; Thu, 11 Jul 2024 13:06:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=VUnP2F/GhNUBOAuGa/ZijGN9c4b7Ttg6SmdiH5XFDG8=; b=LzFXZ/nhY6juUJSy0LdiXR28bN hg56V2N7H9M92bVpDrPyhpdV9l50oYhQXRbqvwjg+WKus255SM2BRBvUiv2ynkdV3PWjJY6xUcCTK 13BgIM9K1a1qkDNthbUHpUtx+zMKnJre7BrCciKgX6vsIdTT2HY/rzuZ92LgZvAAAQmkj6d9PPKma 1CmgOocdmQlangaW2m4x/2oVQ+f1rD8pY2vLbDmRMuXcBUwsH22rLukkIXVom5mw782/1G5ZYsiab 36WQqzabXBjsJceU+zCu/3LaF6WrnVDMlPwGpthnHdN7jfh83CDO9nF50LbVYYYqikFGHsTy7ffZc TuDqsaQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtUy-0000000E50V-3EWz; Thu, 11 Jul 2024 13:06:12 +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 1sRtPY-0000000E1aL-2ZWn; 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=VUnP2F/GhNUBOAuGa/ZijGN9c4b7Ttg6SmdiH5XFDG8=; b=CJxJgiH3zo1A5oMh69WWXFdZ/v MHVbhtiVYEwh2F/8gqFySyxDCzki0bxQmCXz8egSkMfn7kz/5MppbhqRrj4BqHmZPRbcwQ7lGF9mz 99xTgU2N1bM/9nees3Ay2zl9rQAJuimmqcYVaZwAIMsA+SIkW16/JjUl0A0Qz2QCRJJApzEUXfs7u UN6le3h+E78Ehf6OjSt9PEkS5r4z21jEo0SR1e6WBT6xVVakn+cdAqtchINTDfw7BCH8MafDqk1ZX qnSqzCxfDqUT5qeeQ3U9H4u1lAO3XGJCTxE9utcPOjDJrqVbNjrcYZvgDDS3ijkK8Seuq8Zla4Jg8 E3jnVqPQ==; 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-000BX9-7W; 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-0005O1-03; Thu, 11 Jul 2024 15:00:34 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:13 +0200 Subject: [PATCH v3 13/15] mtd: spi-nor: xmc: Use new SPI_NOR_TRY_SFDP flag MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-13-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=1089; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=6sGOeGBjWQoa+lKaakmKJY3XXQ4BYB11RN1yRi3xMDA=; b=XiAissFDssg6IebkzSvdb8kE/Jn1sGzrKHeFXF4USrd1u6C8YdoJVSrNFcoBI76ElTKk3C5QX RduUBlvo78eDFw97VKeV5zHmUzPKWRUgjRQc4xIC9doZbsjXRsCJiFL 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_060036_699210_90C07E13 X-CRM114-Status: GOOD ( 10.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This converts from the old (deprecated) implicit way of triggering an optional SFDP parse with fallback to the static configuration in the matching struct flash_info entry. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/xmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c index d5a06054b0dd..527468630b99 100644 --- a/drivers/mtd/spi-nor/xmc.c +++ b/drivers/mtd/spi-nor/xmc.c @@ -13,12 +13,12 @@ static const struct flash_info xmc_nor_parts[] = { .id = SNOR_ID(0x20, 0x70, 0x17), .name = "XM25QH64A", .size = SZ_8M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, { .id = SNOR_ID(0x20, 0x70, 0x18), .name = "XM25QH128A", .size = SZ_16M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_TRY_SFDP, }, }; 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: 13730686 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3148C3DA41 for ; Thu, 11 Jul 2024 13:05:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=7xyZ8HHn0IZWh6egUhr+Bg7rKb1uk2wj2zFy5v+GCaQ=; b=WAtN+hG2MERw4+Lvtql9/GRjru 959CFJHn+kTCzDuPBfKngLHhcIVmnX+pE78Upcn+lsNAwldA46M3T/12zWgBDjq5p8T9upKU8VAEE 4llI48qvWjd+/Ps57vd7QSKVfJd+82Od/+U46uikZ2ISU70Za7ebxtTUabdanEn166nY5ISUPSCQH JmtvbRlkQL6OmUaTCcg2yfiatkxREQDdHqc6Nnr53QQZ2kFBE7qXKp5ibNPkdQWWPDGLUkAN7At8k OIhBvlit10+GDK/6zqIsdlzthbqZlzBnqU7S6ryeJrbenefSf5VodaSWHlPAYVPScDiJSuPOFj0KD lF1nxMYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtU1-0000000E4Pk-0AOY; Thu, 11 Jul 2024 13:05:13 +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-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.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 From patchwork Thu Jul 11 13:00:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 13730687 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BC8E8C3DA41 for ; Thu, 11 Jul 2024 13:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=/x3Xwhy/zD+b8/iFmghy0uZLwRTAG0iaB95lyFsIrSY=; b=wdcGEr51PxQE7Xiv/PW0L3ax2F 2YLMgYxwK1gE5T/kpPUgYINR9ieaUU95h34bGrNQ/R29yNgXjPvD5rt58FH50UL49uQPrGVy1FvUk ciZ8a/2mXxkZtj2/9Nc/lcj72ndMXgTtQX4zwJnkyVaN5gIPoo8F6LU5HlWiJnu9qo2LNujoSCSIA BNBm/U+RKL+LD1OYTcKCffkTxBKL7/V4IpZHZKeAiun1qLDvympm0MJhMn6L8529cJnbxv0DMl3Ze P8zesbGHKr1GiBwtXqbx3yXyxkHLOKj2tOZ8jV9txZhh3IBsizj7/z3OMIPWg/jhQa6mIgjGyqYqE 0+b3MjAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRtUK-0000000E4ac-17mF; Thu, 11 Jul 2024 13:05:32 +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 1sRtPe-0000000E1dr-3fUt; Thu, 11 Jul 2024 13:00:44 +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=/x3Xwhy/zD+b8/iFmghy0uZLwRTAG0iaB95lyFsIrSY=; b=0R5/4YvH1GzTT+eLqA1zYwGrfo DHt9Ex2kTaC1MkaMxG62DZghwUbzo3kanJQeIIxBrzxb2L5+dHn0jZJit/QJnWqAjHJ0kYF+5V3cE x2SumkbwFgM33pGdjIqHg7INNR206RI9h8tPryTgQUQWbMUiHtZrlIyAHf39asq2x/InRnBucqs57 RlvZb5thdESwRGcEal4g5o3oHIHpdpO0doNPulnfdfd9dQ8HU3mRgeX5vj386JwFAWITYpKBCSlsh ZniLxpsvHXN8UgxBwSPbMEnx4ezxzw5goP6nGI5HrxLCR1y/5O2h8Yi0Vboj2v0dyOxn2Xri5IrNP 4b345A3Q==; 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 1sRtPd-000BXZ-EN; Thu, 11 Jul 2024 15:00:41 +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 1sRtPY-0005XX-0j; Thu, 11 Jul 2024 15:00:35 +0200 From: Esben Haabendal Date: Thu, 11 Jul 2024 15:00:15 +0200 Subject: [PATCH v3 15/15] mtd: spi-nor: spansion: Drop redundant SPI_NOR_SKIP_SFDP flag MIME-Version: 1.0 Message-Id: <20240711-macronix-mx25l3205d-fixups-v3-15-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=2782; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=32WUeUrKPTK1On8oYr52pGY8kKKsIcbyD/ktcMgTl0I=; b=kv2cu/A4E4HA+a4EuZNTqqPIMM+PoYEAWa3H1GKwKtiJ/oVRh7A0CWiRoFQt8GBkr8psS8Pbl WfhMZzwLWsNAHxwdFNHKEg4bHEN1i00QOJnEkQduDBUG3+bN44oIiZC 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_060042_950901_ADC7AB81 X-CRM114-Status: GOOD ( 15.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org With the implementation of SPI_NOR_TRY_SFDP flag, the removal of the deprecated mechanism for trying SFDP parsing, and the alignment of ->default_init() hooks handling, the SPI_NOR_SKIP_SFDP flag has become a no-op, so it can safely be removed. Signed-off-by: Esben Haabendal --- drivers/mtd/spi-nor/core.c | 2 +- drivers/mtd/spi-nor/core.h | 5 +---- drivers/mtd/spi-nor/spansion.c | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index d58f107f62ec..518b2707ce80 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -3024,7 +3024,7 @@ static int spi_nor_init_params(struct spi_nor *nor) if (spi_nor_needs_sfdp(nor)) { ret = spi_nor_parse_sfdp(nor); if (ret) { - dev_err(nor->dev, "BFPT parsing failed. Please consider using SPI_NOR_SKIP_SFDP or SPI_NOR_TRY_SFDP when declaring the flash\n"); + dev_err(nor->dev, "BFPT parsing failed. Please consider using SPI_NOR_TRY_SFDP when declaring the flash\n"); return ret; } } else { diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index f4a76f42051a..ae10e12e9078 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -485,9 +485,7 @@ struct spi_nor_id { * * @no_sfdp_flags: flags that indicate support that can be discovered via SFDP. * Used when SFDP tables are not defined in the flash. These - * flags are used together with the SPI_NOR_SKIP_SFDP or - * SPI_NOR_TRY_SFDP flag. - * SPI_NOR_SKIP_SFDP: skip parsing of SFDP tables. + * flags are used together with the SPI_NOR_TRY_SFDP flag. * SECT_4K: SPINOR_OP_BE_4K works uniformly. * SPI_NOR_TRY_SFDP: try parsing SFDP tables before using the * parameters specified in this struct. @@ -536,7 +534,6 @@ struct flash_info { #define SPI_NOR_RWW BIT(9) u8 no_sfdp_flags; -#define SPI_NOR_SKIP_SFDP BIT(0) #define SECT_4K BIT(1) #define SPI_NOR_TRY_SFDP BIT(2) #define SPI_NOR_DUAL_READ BIT(3) diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c index a58c0229003d..afcb684ffe4d 100644 --- a/drivers/mtd/spi-nor/spansion.c +++ b/drivers/mtd/spi-nor/spansion.c @@ -793,7 +793,7 @@ static const struct flash_info spansion_nor_parts[] = { .name = "s25fl256s0", .size = SZ_32M, .sector_size = SZ_256K, - .no_sfdp_flags = SPI_NOR_SKIP_SFDP | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, .mfr_flags = USE_CLSR, }, { .id = SNOR_ID(0x01, 0x02, 0x19, 0x4d, 0x00, 0x81),