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, } };