From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7A85375AAB for ; Mon, 1 Jun 2026 12:54:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780318485; cv=none; b=lWa+0GSqWgeSzHp6FUQa75sHFAoL5horbBx7BtzFgpoc+jbq6fTuWsmpZpvNGZOEEXzbACIJPUYX6mSi/FuuGKPxSy4wOBmWiOPYQU6mJ4u5tYG/Yr857A+5K5mXOnKgzZLNPtw0xDpqq9G6B7rsd652hjD1o+lt4R7+TVYW9VA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780318485; c=relaxed/simple; bh=UvCAc//u5kM/8uSp5OGfzAOBOGm+vbnOlOhdpLxNXQI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=eZN9CUSsUHKhjiM6QpcQp4oQksL9mLqyl9gxJHfSYSRUY9BwuomsQL5i8q92nt/DeDNtvLwHIMqMvFIaG9021OrAaMwtC+dqCiADZyQA6Rv2NM3PjKqCJOy2X71hODDlLTIycanq+dUDDWDPvr6whkheH9o7YbPR+ceimCUS4cM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MWP0jfBf; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MWP0jfBf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D07141F00893; Mon, 1 Jun 2026 12:54:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780318484; bh=DJWqFwNOB/m3tEt5oHYuoWheZSYkh5nf9lNnEZ96oCs=; h=From:To:Cc:Subject:Date; b=MWP0jfBfgaXrzSdveeqzf3yirr0PpFrfORvFgy79Kad9Qq1cOFc7lsghh9YChcIzZ Tnh7vptO54b62cXlimsc/xyqhYfhMNBzhn8V1NhxpkHNL5RyGomgeMW6lxK+zbcccW 52ZdXbY0CDAKgOPgRVJGUaK+4jyGg+ObeWLFuUAIfXtVUs++Z9Dycy9rxrpLpWe4If Adh5qhmz0QC6VYffs1z1gzGyYcRTDfin8d/lFj+BppHt3qdcpZF6c2QY/LVP6OV2t8 e/VBsokHda9p+a/IeaOIHXkRZs7VAq4Cs8L/Rd0asgSTYmr3htgv4pATZgpA+VuJJm bWFVGfhAHNB4A== From: Michael Walle To: Pratyush Yadav , Michael Walle , Takahiro Kuwano , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/3] mtd: spi-nor: Rework flash parameter initialization Date: Mon, 1 Jun 2026 14:52:42 +0200 Message-ID: <20260601125438.3481722-1-mwalle@kernel.org> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Try to simplify the flash initialization and get rid of the legacy handling. As default, all the flags of the in-kernel database are taken and amended with the SFDP data. This might have the consequence that all the flashes now get a RDSFPD opcode which might be an unknown opcode. But that was already the case for any flashes which were unknown to the linux kernel. So far, there was not a single complaint. See patch 3 for more information. If feedback is positive, this is intended to be applied to the spi-nor tree after the next merge window, so it will sit around in -next for quite some time and get some testing. That being said, I've just did a quick test on my boards. Please give it a test on your boards. Michael Walle (3): mtd: spi-nor: spansion: s25fl256s0: remove SKIP_SFDP flag mtd: spi-nor: don't clear the SNOR_F_4B_OPCODES flag on failure mtd: spi-nor: rework flash parameter initialization drivers/mtd/spi-nor/core.c | 67 +++++++++++----------------------- drivers/mtd/spi-nor/core.h | 1 - drivers/mtd/spi-nor/spansion.c | 2 +- 3 files changed, 23 insertions(+), 47 deletions(-) -- 2.47.3