From patchwork Fri Sep 8 10:16:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 1831458 X-Patchwork-Delegate: tudor.ambarus@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=IpClLWll; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=ToBlbVT7; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=KYs9Tqa2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhsY41cqGz1yhG for ; Fri, 8 Sep 2023 20:19:36 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LDtPcNmpSxhR9dzW6I/sCWDUY6I1YqCrtZ5F3PsakjQ=; b=IpClLWllY8wt8S nJCEimfxRlvvZBVOy0VRK8wMcyV7aSKrnHpIBvX36DVq80/YhV/YKkfI0fPgWvfDHUDcyk3l81kkY RyWe6WZW+5xUkAzeixg1xeAggxmoh907ZO4x81GFNw8YOrmn77GseG9DHWIz10CgPS71abqXb47W/ hIBMsEi/hIvBRfZUI5yE6QDD9LpI91TL1t0E/8wqcRHi5qfuDOc4MoXSqtBxXMC6n4XUMAC22VXIE sd1xqTpUrGuZIGl9BmNIl9V90+K53j9SVqHbGrVeYEJ/qoIfvseainD/wekyxSxVj+csHK7er5+Yw 0T4MW7hUFcY6iYsKY7mA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qeYZx-00DUrW-1p; Fri, 08 Sep 2023 10:19:09 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qeYYl-00DTzP-36 for linux-mtd@bombadil.infradead.org; Fri, 08 Sep 2023 10:17:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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; bh=9YslaNHLVbYAF5RZ98e28rXqAbBYAvtOwgXkEZm32dY=; b=ToBlbVT7K4h3x4J6Pi8kxs3/Wq Vm+hmdRZ2YqGEK6M3+OMArhXWIVm5VHZUtBJ41pl3mhqCO4fbyO3cWLELAu3QZ0IIl67NI1avLqEW Vum9IYVMRShyukeRg6ie5P+3k+0rbQ7wwC6+31z5XggH4Z81ZDrfsDg1nrQsS+c5jgsT/ghn0xRiN kWWDPEixhEHihWVIDGkv6FXFgID4/kAlJTKPLhNxd4uL6KglCBmOavIOGs3QTklowTs3XS+WQWIDD TDLMa5ljv9r2r/REdDWAfCLg4lJWio+j+3WUZN7vkDX74MbIttwLPjjWGlz8MpOxKDlF0iTPqu4j7 7/Z8meAw==; Received: from ams.source.kernel.org ([145.40.68.75]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qeYYZ-002R2Z-02 for linux-mtd@lists.infradead.org; Fri, 08 Sep 2023 10:17:54 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AAB48B8203F; Fri, 8 Sep 2023 10:17:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96EF6C116A5; Fri, 8 Sep 2023 10:17:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694168261; bh=v3ofMUp8UBxPgYd5XD7XRHJNeXUWfMpXY/dIXqoAhK8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=KYs9Tqa2pQAeynSVO5MaBwrKZXZnwlPteFsvgPIoYFGng2+Fhw5by9XzHeYOYDaWG TJKJKvS4EFsnRtr7vQSf+78bh30Tm/ms+1+f1SzW+P0qmrslxSFllN0kTVMs0B80JH vuufCfAQZaS3t7/hQPz2X6CN25VfaU6+MTVuEquhYO3UdVsbiRC+lH30Zrzy6C9AZq wnffu1Okh1+SWAsbNDgBFOjELfYhQiIlZxO7LgyM/dgQ6i/ka5yo4Nlkvj6YIvewV+ 5Kej6qCHyiy+/pvXKg6Z4nWTG0e/mV7U/nkZmjCKUu7LjQppf7UtT/pDrduV6ZSRoH nyixOmHDrKhRg== From: Michael Walle Date: Fri, 08 Sep 2023 12:16:52 +0200 Subject: [PATCH v3 34/41] mtd: spi-nor: issi: sort flash_info database MIME-Version: 1.0 Message-Id: <20230807-mtd-flash-info-db-rework-v3-34-e60548861b10@kernel.org> References: <20230807-mtd-flash-info-db-rework-v3-0-e60548861b10@kernel.org> In-Reply-To: <20230807-mtd-flash-info-db-rework-v3-0-e60548861b10@kernel.org> To: Tudor Ambarus , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Michael Walle X-Mailer: b4 0.12.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230908_111748_630991_669C0CDB X-CRM114-Status: GOOD ( 11.27 ) X-Spam-Score: -2.5 (--) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The flash ID is the new primary key into our database. Sort the entry by it. Keep the most specific ones first, because there might be ID collisions between shorter and longer ones. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/issi.c | 44 ++++++++++++++++++++++ 1 file changed, 22 insertions(+), 22 deletions(-) Content analysis details: (-2.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [145.40.68.75 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The flash ID is the new primary key into our database. Sort the entry by it. Keep the most specific ones first, because there might be ID collisions between shorter and longer ones. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/issi.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/mtd/spi-nor/issi.c b/drivers/mtd/spi-nor/issi.c index 9478f1e61626..18d9a00aa22e 100644 --- a/drivers/mtd/spi-nor/issi.c +++ b/drivers/mtd/spi-nor/issi.c @@ -48,26 +48,43 @@ static const struct spi_nor_fixups pm25lv_nor_fixups = { static const struct flash_info issi_nor_parts[] = { { + .name = "pm25lv512", + .sector_size = SZ_32K, + .size = SZ_64K, + .no_sfdp_flags = SECT_4K, + .fixups = &pm25lv_nor_fixups + }, { + .name = "pm25lv010", + .sector_size = SZ_32K, + .size = SZ_128K, + .no_sfdp_flags = SECT_4K, + .fixups = &pm25lv_nor_fixups + }, { .id = SNOR_ID(0x7f, 0x9d, 0x20), .name = "is25cd512", .sector_size = SZ_32K, .size = SZ_64K, .no_sfdp_flags = SECT_4K, + }, { + .id = SNOR_ID(0x7f, 0x9d, 0x46), + .name = "pm25lq032", + .size = SZ_4M, + .no_sfdp_flags = SECT_4K, }, { .id = SNOR_ID(0x9d, 0x40, 0x13), .name = "is25lq040b", .size = SZ_512K, .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, - }, { - .id = SNOR_ID(0x9d, 0x60, 0x15), - .name = "is25lp016d", - .size = SZ_2M, - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, }, { .id = SNOR_ID(0x9d, 0x60, 0x14), .name = "is25lp080d", .size = SZ_1M, .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + }, { + .id = SNOR_ID(0x9d, 0x60, 0x15), + .name = "is25lp016d", + .size = SZ_2M, + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, }, { .id = SNOR_ID(0x9d, 0x60, 0x16), .name = "is25lp032", @@ -109,23 +126,6 @@ static const struct flash_info issi_nor_parts[] = { .flags = SPI_NOR_QUAD_PP, .fixups = &is25lp256_fixups, .fixup_flags = SPI_NOR_4B_OPCODES, - }, { - .name = "pm25lv512", - .sector_size = SZ_32K, - .size = SZ_64K, - .no_sfdp_flags = SECT_4K, - .fixups = &pm25lv_nor_fixups - }, { - .name = "pm25lv010", - .sector_size = SZ_32K, - .size = SZ_128K, - .no_sfdp_flags = SECT_4K, - .fixups = &pm25lv_nor_fixups - }, { - .id = SNOR_ID(0x7f, 0x9d, 0x46), - .name = "pm25lq032", - .size = SZ_4M, - .no_sfdp_flags = SECT_4K, } };