From nobody Sun Sep 7 12:25:51 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 B61E4C001B0 for ; Mon, 7 Aug 2023 13:23:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234064AbjHGNXh (ORCPT ); Mon, 7 Aug 2023 09:23:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234107AbjHGNXA (ORCPT ); Mon, 7 Aug 2023 09:23:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8186719BD for ; Mon, 7 Aug 2023 06:22:35 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 56BD861ADA for ; Mon, 7 Aug 2023 13:22:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18225C433CB; Mon, 7 Aug 2023 13:22:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691414550; bh=FMrL+V9+pSz441pre2fqIuiBhaXySkpsxmO1V8C9qk8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=R+WwD1y2lEmfVbe0XZBGXdq72nqTe5wIV4LYk5gXBqXzPWTxzngn+XVYlKQEXvpzL vjcST3zvz6CHnnzU8mPB3/fPxPVGx3SJrrIHhOd8/uPk/y9bn/+pESxlbeW+5k02K7 1LVqHnScimFI2WOMI/VgsDDjg0srPx5/LhAHVMSsAeKFXVIV1DYfKshaXJJqEuy/XF c0mZZk78NqreNIdMTl08Sjey3dOMRvMtBvgIQChP45hFcwZkjRJNPaWUbveTA4MeKv 4XEuybJ8r6YdVkwF4hBo4LaHVq1Fv9aaIuEAcMBV9AiCxbsiNpW3pwuQR2t6u+H924 SvTg4Y60LQYww== From: Michael Walle Date: Mon, 07 Aug 2023 15:21:12 +0200 Subject: [PATCH 18/41] mtd: spi-nor: eon: 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-v1-18-3d3d5bef4ba4@kernel.org> References: <20230807-mtd-flash-info-db-rework-v1-0-3d3d5bef4ba4@kernel.org> In-Reply-To: <20230807-mtd-flash-info-db-rework-v1-0-3d3d5bef4ba4@kernel.org> To: Tudor Ambarus , Pratyush Yadav , Michael Walle , 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/eon.c | 72 +++++++++++++++++++++++++++++++++++--------= ---- 1 file changed, 54 insertions(+), 18 deletions(-) diff --git a/drivers/mtd/spi-nor/eon.c b/drivers/mtd/spi-nor/eon.c index 4848ffe8b38f..ba09cb6c2abd 100644 --- a/drivers/mtd/spi-nor/eon.c +++ b/drivers/mtd/spi-nor/eon.c @@ -9,24 +9,60 @@ #include "core.h" =20 static const struct flash_info eon_nor_parts[] =3D { - { "en25f32", INFO(0x1c3116, 0, 64 * 1024, 64) - NO_SFDP_FLAGS(SECT_4K) }, - { "en25p32", INFO(0x1c2016, 0, 64 * 1024, 64) }, - { "en25q32b", INFO(0x1c3016, 0, 64 * 1024, 64) }, - { "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128) }, - { "en25q64", INFO(0x1c3017, 0, 64 * 1024, 128) - NO_SFDP_FLAGS(SECT_4K) }, - { "en25q80a", INFO(0x1c3014, 0, 64 * 1024, 16) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) }, - { "en25qh16", INFO(0x1c7015, 0, 64 * 1024, 32) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) }, - { "en25qh32", INFO(0x1c7016, 0, 64 * 1024, 64) }, - { "en25qh64", INFO(0x1c7017, 0, 64 * 1024, 128) - NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) }, - { "en25qh128", INFO(0x1c7018, 0, 64 * 1024, 256) }, - { "en25qh256", INFO(0x1c7019, 0, 64 * 1024, 0) }, - { "en25s64", INFO(0x1c3817, 0, 64 * 1024, 128) - NO_SFDP_FLAGS(SECT_4K) }, + { + .id =3D SNOR_ID(0x1c, 0x31, 0x16), + .name =3D "en25f32", + .size =3D SZ_4M, + .no_sfdp_flags =3D SECT_4K, + }, { + .id =3D SNOR_ID(0x1c, 0x20, 0x16), + .name =3D "en25p32", + .size =3D SZ_4M, + }, { + .id =3D SNOR_ID(0x1c, 0x30, 0x16), + .name =3D "en25q32b", + .size =3D SZ_4M, + }, { + .id =3D SNOR_ID(0x1c, 0x20, 0x17), + .name =3D "en25p64", + .size =3D SZ_8M, + }, { + .id =3D SNOR_ID(0x1c, 0x30, 0x17), + .name =3D "en25q64", + .size =3D SZ_8M, + .no_sfdp_flags =3D SECT_4K, + }, { + .id =3D SNOR_ID(0x1c, 0x30, 0x14), + .name =3D "en25q80a", + .size =3D SZ_1M, + .no_sfdp_flags =3D SECT_4K | SPI_NOR_DUAL_READ, + }, { + .id =3D SNOR_ID(0x1c, 0x70, 0x15), + .name =3D "en25qh16", + .size =3D SZ_2M, + .no_sfdp_flags =3D SECT_4K | SPI_NOR_DUAL_READ, + }, { + .id =3D SNOR_ID(0x1c, 0x70, 0x16), + .name =3D "en25qh32", + .size =3D SZ_4M, + }, { + .id =3D SNOR_ID(0x1c, 0x70, 0x17), + .name =3D "en25qh64", + .size =3D SZ_8M, + .no_sfdp_flags =3D SECT_4K | SPI_NOR_DUAL_READ, + }, { + .id =3D SNOR_ID(0x1c, 0x70, 0x18), + .name =3D "en25qh128", + .size =3D SZ_16M, + }, { + .id =3D SNOR_ID(0x1c, 0x70, 0x19), + .name =3D "en25qh256", + }, { + .name =3D "en25s64", + .id =3D SNOR_ID(0x1c, 0x38, 0x17), + .size =3D SZ_8M, + .no_sfdp_flags =3D SECT_4K, + }, }; =20 const struct spi_nor_manufacturer spi_nor_eon =3D { --=20 2.39.2