From nobody Mon Sep 8 07:58:24 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39F9EEE57F0 for ; Fri, 8 Sep 2023 10:18:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235363AbjIHKSM (ORCPT ); Fri, 8 Sep 2023 06:18:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239782AbjIHKSH (ORCPT ); Fri, 8 Sep 2023 06:18:07 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE8051FFD for ; Fri, 8 Sep 2023 03:17:35 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 274FBC433A9; Fri, 8 Sep 2023 10:17:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694168237; bh=u3h1HEnFV5TaycBrs44qWUZVzeJsRZVGR9YPZRIQPdw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=QZ4w+uYAi0wf19ca13U2ZAkFJvZG3qL4H3YTNHcAM/zE2j2UY7/8ECEMvYwAkuLpy ZT/nGFJ+ykAVxuR4Ij3Lm7mdB1UbHMNu137jM+ycHOsLnsocYgfP49eZ1J9RKkyiLV 4EsmFPajRMNMwi6d+0M9TfUp3jyMx8vV87n38MzoTSFDcJZK5ODZHB2qG5mLtxo6Qg /e3MrHwWMLebXQl0wA1KtlhcInRF1ARAyuv+HLlLjezXhWZUgGI71DotyKka766Plf xazelLLosjVonlEKMS2V+XjSHkAHAMbyYB4YGocEf1EOlj5ld37dqg2NXYlBNt17NB vr3BcP+v8ioAw== From: Michael Walle Date: Fri, 08 Sep 2023 12:16:41 +0200 Subject: [PATCH v3 23/41] mtd: spi-nor: issi: convert flash_info to new format MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230807-mtd-flash-info-db-rework-v3-23-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The INFOx() macros are going away. Convert the flash_info database to the new format. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/issi.c | 114 +++++++++++++++++++++++++++++++----------= ---- 1 file changed, 78 insertions(+), 36 deletions(-) diff --git a/drivers/mtd/spi-nor/issi.c b/drivers/mtd/spi-nor/issi.c index d31401bcab64..9478f1e61626 100644 --- a/drivers/mtd/spi-nor/issi.c +++ b/drivers/mtd/spi-nor/issi.c @@ -47,44 +47,86 @@ static const struct spi_nor_fixups pm25lv_nor_fixups = =3D { }; =20 static const struct flash_info issi_nor_parts[] =3D { - { "is25cd512", INFO(0x7f9d20, 0, 32 * 1024, 2) - NO_SFDP_FLAGS(SECT_4K) }, - { "is25lq040b", INFO(0x9d4013, 0, 64 * 1024, 8) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { "is25lp016d", INFO(0x9d6015, 0, 64 * 1024, 32) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { "is25lp080d", INFO(0x9d6014, 0, 64 * 1024, 16) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { "is25lp032", INFO(0x9d6016, 0, 64 * 1024, 64) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) }, - { "is25lp064", INFO(0x9d6017, 0, 64 * 1024, 128) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) }, - { "is25lp128", INFO(0x9d6018, 0, 64 * 1024, 256) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) }, - { "is25lp256", INFO(0x9d6019, 0, 64 * 1024, 0) - FIXUP_FLAGS(SPI_NOR_4B_OPCODES) - .fixups =3D &is25lp256_fixups }, - { "is25wp032", INFO(0x9d7016, 0, 64 * 1024, 64) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { "is25wp064", INFO(0x9d7017, 0, 64 * 1024, 128) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { "is25wp128", INFO(0x9d7018, 0, 64 * 1024, 256) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { "is25wp256", INFO(0x9d7019, 0, 0, 0) - FIXUP_FLAGS(SPI_NOR_4B_OPCODES) - FLAGS(SPI_NOR_QUAD_PP) - .fixups =3D &is25lp256_fixups }, - - { "pm25lv512", INFO0(32 * 1024, 2) - NO_SFDP_FLAGS(SECT_4K) + { + .id =3D SNOR_ID(0x7f, 0x9d, 0x20), + .name =3D "is25cd512", + .sector_size =3D SZ_32K, + .size =3D SZ_64K, + .no_sfdp_flags =3D SECT_4K, + }, { + .id =3D SNOR_ID(0x9d, 0x40, 0x13), + .name =3D "is25lq040b", + .size =3D SZ_512K, + .no_sfdp_flags =3D SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + }, { + .id =3D SNOR_ID(0x9d, 0x60, 0x15), + .name =3D "is25lp016d", + .size =3D SZ_2M, + .no_sfdp_flags =3D SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + }, { + .id =3D SNOR_ID(0x9d, 0x60, 0x14), + .name =3D "is25lp080d", + .size =3D SZ_1M, + .no_sfdp_flags =3D SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + }, { + .id =3D SNOR_ID(0x9d, 0x60, 0x16), + .name =3D "is25lp032", + .size =3D SZ_4M, + .no_sfdp_flags =3D SECT_4K | SPI_NOR_DUAL_READ, + }, { + .id =3D SNOR_ID(0x9d, 0x60, 0x17), + .name =3D "is25lp064", + .size =3D SZ_8M, + .no_sfdp_flags =3D SECT_4K | SPI_NOR_DUAL_READ, + }, { + .id =3D SNOR_ID(0x9d, 0x60, 0x18), + .name =3D "is25lp128", + .size =3D SZ_16M, + .no_sfdp_flags =3D SECT_4K | SPI_NOR_DUAL_READ, + }, { + .id =3D SNOR_ID(0x9d, 0x60, 0x19), + .name =3D "is25lp256", + .fixups =3D &is25lp256_fixups, + .fixup_flags =3D SPI_NOR_4B_OPCODES, + }, { + .id =3D SNOR_ID(0x9d, 0x70, 0x16), + .name =3D "is25wp032", + .size =3D SZ_4M, + .no_sfdp_flags =3D SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + }, { + .id =3D SNOR_ID(0x9d, 0x70, 0x17), + .size =3D SZ_8M, + .name =3D "is25wp064", + .no_sfdp_flags =3D SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + }, { + .id =3D SNOR_ID(0x9d, 0x70, 0x18), + .name =3D "is25wp128", + .size =3D SZ_16M, + .no_sfdp_flags =3D SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, + }, { + .id =3D SNOR_ID(0x9d, 0x70, 0x19), + .name =3D "is25wp256", + .flags =3D SPI_NOR_QUAD_PP, + .fixups =3D &is25lp256_fixups, + .fixup_flags =3D SPI_NOR_4B_OPCODES, + }, { + .name =3D "pm25lv512", + .sector_size =3D SZ_32K, + .size =3D SZ_64K, + .no_sfdp_flags =3D SECT_4K, .fixups =3D &pm25lv_nor_fixups - }, - { "pm25lv010", INFO0(32 * 1024, 4) - NO_SFDP_FLAGS(SECT_4K) + }, { + .name =3D "pm25lv010", + .sector_size =3D SZ_32K, + .size =3D SZ_128K, + .no_sfdp_flags =3D SECT_4K, .fixups =3D &pm25lv_nor_fixups - }, - { "pm25lq032", INFO(0x7f9d46, 0, 64 * 1024, 64) - NO_SFDP_FLAGS(SECT_4K) }, + }, { + .id =3D SNOR_ID(0x7f, 0x9d, 0x46), + .name =3D "pm25lq032", + .size =3D SZ_4M, + .no_sfdp_flags =3D SECT_4K, + } }; =20 static void issi_nor_default_init(struct spi_nor *nor) --=20 2.39.2