From nobody Tue Feb 10 00:02:21 2026 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE6E8433C0 for ; Thu, 19 Dec 2024 09:20:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600012; cv=none; b=iMtsv0yzLaBT6RnicXaDOYi7Y1nnq+MLpWXlLLccP7lr58ZGnKzCy1wiUQdytuNuRTMz4c1eOs1I/9x6RL+N18BLojXexyJFI4DPnbgbGvtvmEAMZLSlVodU3IHUnSDoxkX+s0iwIpYeqC06bTvuxxMdOCpXsvtIUrQQ78OyfQw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600012; c=relaxed/simple; bh=hnY/8vn+b1KlPlvdNquO8fmNX5DWSQremtaRCjmMhDs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=AvNW+5zGGyXGdPSkczoE8kcUPcwCkthpgDa7BQthmXYcs1oaS4ARFGCRC2DEtiW5Fn/IWfctJQ9giBUWOfY8kyvPxy1q9wZlcukLZAYA/kENVodAwE66hVTsTsT3+6BysLBnA/WrxQhbCQiq6A5ZvLBvEfNb13QwogZL6MWBLJw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Nn6ms0fj; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Nn6ms0fj" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4361f65ca01so5319065e9.1 for ; Thu, 19 Dec 2024 01:20:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734600009; x=1735204809; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=lFyJH0Yc8JVZMax97u3uq/YfTUBmXm0NRUlfRtRQNq8=; b=Nn6ms0fjPajXnCtdD+RZvqNL/T3AuCgJx+pQvLm1NjLH85rbBleuoHgqXUBzhUQwEj nkPK8rMnn2y3V9YZtz24wgH7Q1J6vVS4GfRhTqANSOiY9m7r8nfZcEoeKhYBXcHr1eIm Xu7VNaBDPQGcM0Pc4XxKDtcSRYEdQTUCCnu5hEz79Ky+xp7qMyh3qkas5Gu+pmDEbTGc zTbro6aZKbOXDoHGb3wSL9YRBw2GCf7SBCJlbJkGPE1zlqih8S8sSNtpFzWLlGCOS9Je On5v8B+/igz+pm98EFfoL7nJyk5Iydf2BFHvK3IePb7gZylcA5MVKHHneMACH/BW0egl h6rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734600009; x=1735204809; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lFyJH0Yc8JVZMax97u3uq/YfTUBmXm0NRUlfRtRQNq8=; b=KiJC6S8h5r094V/lQmTGooPYyDz1q01OikXTWwEmOqd+x4qyeV+hoOPTTi/w2zEXn2 i4cX/xO9tMAOr0BiQrzOE1pQ/7Y+RaPQG05Dvsv199+komRrd0GszwhMuJrRrR6DcP01 w4dl69mj5zmIf8Q7ruI/jg0fuN/4RBAR9lVltohvZTiP07bufHGuz3L8saXe4J0xmIbN YI+AlyP6Rh4/J7ShE6UNWKBOQyYFibs9Iu071YmFF6cYaoz4BYDn+twpMZtbw7+yWEj+ eQW6n2RyvTtd3ZnPRlhehEZYdT2YNomXJS2Rmjm0eZKhu1F8wwmrGyO4XuOgTcZ6cBBl o3EQ== X-Forwarded-Encrypted: i=1; AJvYcCU7uID50KVRfL1NO5q5LQCQBU+UXalN7ys5FAzKNKpV7xhBjZaCjaGOztEpL4FSAz/m35n3sg7L3UQrxI8=@vger.kernel.org X-Gm-Message-State: AOJu0YwRLOENQYC3QXPBDVwubShiN10pgfT0mGnkviVU8fp8APfEfHqZ T3mnu4Gb9W7Ssr5HJQ8GgMkSMkNzRQGr0+H2q123B3gyv2Pl2dayxF07LP9eEpo= X-Gm-Gg: ASbGncuNEb+3Qp/tKH7HXVeiHAcOLyP64Z4qTyGWH42nB0SEmg2uTKKWGzyyxfIu6j9 q8a2dcc/pwieKNffD4rs0D2ocGxDsZPdbmF6W9PF5zKC1kD1becW6+cFSLVHxATjb7Re9OgPXLT u0OY1HGBj5W70B+9e3SRjVVnO9keVdabuKWs6AyYEkW8Rpxvyo4bgiEB1t59V6kixSTAmCl8GEO 5dZENmikuINb//AvFGETY0j5ZJnvKy5n7Dhb3eviaGHhTmiWHkCw2gR9xqhf8rQBF48Pg4Getk3 qVBbXKGdLg78w7BnKq02Ofd2Gsuv5qQ4Qcfg X-Google-Smtp-Source: AGHT+IGJ4zLrYvzarwvJgukTsCLtYzM7PyANl1YefcunJqYe37avUW0KzjlaPF8ZSTQw2Sst8cB8UA== X-Received: by 2002:a05:600c:1910:b0:435:1a2:2633 with SMTP id 5b1f17b1804b1-43655368155mr64500415e9.15.1734600009132; Thu, 19 Dec 2024 01:20:09 -0800 (PST) Received: from ta2.c.googlers.com (130.173.34.34.bc.googleusercontent.com. [34.34.173.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4366127c4bbsm12222295e9.32.2024.12.19.01.20.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 01:20:08 -0800 (PST) From: Tudor Ambarus Date: Thu, 19 Dec 2024 09:20:04 +0000 Subject: [PATCH] mtd: spi-nor: extend description of size member of struct flash_info Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241219-spi-nor-flash-info-size-desc-v1-1-6b53cf011027@linaro.org> X-B4-Tracking: v=1; b=H4sIAEPlY2cC/x3MQQqAIBAAwK/InltIK6K+Eh1E11oIFRciiv6ed JzLPCBUmARm9UChk4VTrNCNArfbuBGyrwbTml4bPaFkxpgKhsPKjhxDQuGb0JM4NN51ehhpmDo LtciFAl9/v6zv+wFji1LEbgAAAA== To: Renjun Wang , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Tudor Ambarus X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734600008; l=1787; i=tudor.ambarus@linaro.org; s=20241212; h=from:subject:message-id; bh=hnY/8vn+b1KlPlvdNquO8fmNX5DWSQremtaRCjmMhDs=; b=uYARATeYVOEhCLNa4zL2C84/SxxQv84Wvdx/9r9cwS8NNtqoKrK+V37qrvYDF7Xp9IEs8dsxR z4HEUGAxeNVBkxoq8E/4i0rykJ+f7z2JnYTHiCElfpRam0zhTHMNEaP X-Developer-Key: i=tudor.ambarus@linaro.org; a=ed25519; pk=uQzE0NXo3dIjeowMTOPCpIiPHEz12IA/MbyzrZVh9WI= We use the size as an indicator whether to parse SFDP or not. We don't introduce a dedicated member for SFDP parsing because we'd like to keep the struct size at a minimum, as it's used for every flash declaration. Ideally we won't have flash entries at all, but there are still flash parameters that aren't defined by SFDP, thus we need to statically specify them. Signed-off-by: Tudor Ambarus Reviewed-by: Michael Walle Reviewed-by: Miquel Raynal --- Describe member to avoid confusion. --- drivers/mtd/spi-nor/core.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index 5c33740ed7f5..ceff412f7d65 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -448,7 +448,11 @@ struct spi_nor_id { * @id: pointer to struct spi_nor_id or NULL, which means "no ID" (mostly * older chips). * @name: (obsolete) the name of the flash. Do not set it for new addition= s. - * @size: the size of the flash in bytes. + * @size: the size of the flash in bytes. The flash size is one + * property parsed by the SFDP. We use it as an indicator + * whether we need SFDP parsing for a particular flash. + * I.e. non-legacy flash entries in flash_info will have + * a size of zero iff SFDP should be used. * @sector_size: (optional) the size listed here is what works with * SPINOR_OP_SE, which isn't necessarily called a "sector= " by * the vendor. Defaults to 64k. --- base-commit: 78d4f34e2115b517bcbfe7ec0d018bbbb6f9b0b8 change-id: 20241219-spi-nor-flash-info-size-desc-2dc3157e593a Best regards, --=20 Tudor Ambarus