From patchwork Wed Aug 10 22:06:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 1665373 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=zCH5aQ8x; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.a=rsa-sha256 header.s=mail2016061301 header.b=Pc2ISALx; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M33wh4lcHz9sG6 for ; Thu, 11 Aug 2022 08:08:20 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=0fVCq21R+jCgFFaXmIHHsTeNgVHZbeFL1XXYscmWcCk=; b=zCH5aQ8xMYxLgD rGHTxoezD7nPcHuKRYdcSUwXwrGgREVDNt6s1c+0k5mLhemGoQBSeZjMggCtYGOjaxWTt/npihhVi mUtn7CjUR9YPtXfIYcub9XuQ2RQEqZEPXTWMECfisOn7iNbbBBgYQ6p4uVTROY4OI3R1YpqpGGdhI ZXvBr1ECbOtFtNMoVPJSsBfWjEdxjVEbq7iJuWnccmk6oTnElURFbBC5vuQcnuXbNwFqAsQXexYcl g5N9hxsbshcEb5nS+iVHxLDK4VVKsgW+MGSNNaXVSULh717FR6xfQGnZfjjcKH6EOhagUj1XybAmP gsKMuDcFEr9IK+6432vQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLtrX-00Ff4v-Mu; Wed, 10 Aug 2022 22:07:39 +0000 Received: from ssl.serverraum.org ([2a01:4f8:151:8464::1:2]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLtrE-00Fegm-As for linux-mtd@lists.infradead.org; Wed, 10 Aug 2022 22:07:23 +0000 Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id D46B5221D4; Thu, 11 Aug 2022 00:07:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1660169228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=NqeFnD6tHk0Apg0ipYoUap63hcDSdx+M2oLGDxmnAGA=; b=Pc2ISALxIS69FN6jyWJoKawAM4PcbVH3rWPFMJtBb0++4GYUI9MMpXLFN+Js3Hsc/QXfyR pzTabIbJYDZLnk8RjAv7BwbNSMM2fJnSb9dDuBCIInW5JqaD9F4M8TSrJlHPiOcQzdsSwO 7hSx1OXY0RtfqmH47QF5/JyOudwoOXY= From: Michael Walle To: Tudor Ambarus , Pratyush Yadav Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Michael Walle Subject: [PATCH v2 0/7] mtd: spi-nor: generic flash driver Date: Thu, 11 Aug 2022 00:06:47 +0200 Message-Id: <20220810220654.1297699-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220810_150720_769101_61C12CA0 X-CRM114-Status: UNSURE ( 9.80 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.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: Add a generic flash driver, which is used when we don't find a matching flash in our database. All the basic features of a flash can be discovered by SFDP and most (if not all) newer flashes support i [...] 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 [2a01:4f8:151:8464:0:0:1:2 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 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 Add a generic flash driver, which is used when we don't find a matching flash in our database. All the basic features of a flash can be discovered by SFDP and most (if not all) newer flashes support it. changes since v1: - fix doc prototype mistake reported by the kernel test robot - preset page_size to 256 to support flashes which just have SFDP data corresponding to JESD216A - add new patch mtd: spi-nor: fix select_uniform_erase to skip 0 erase size - add function doc to explain wanted_size=0 in spi_nor_select_uniform_erase() Michael Walle (7): mtd: spi-nor: hide jedec_id sysfs attribute if not present mtd: spi-nor: sysfs: hide manufacturer if it is not set mtd: spi-nor: remember full JEDEC flash ID mtd: spi-nor: move function declaration out of sfdp.h mtd: spi-nor: fix select_uniform_erase to skip 0 erase size mtd: spi-nor: add generic flash driver mtd: spi-nor: sysfs: print JEDEC ID for generic flash driver .../ABI/testing/sysfs-bus-spi-devices-spi-nor | 6 ++++ drivers/mtd/spi-nor/core.c | 35 +++++++++++++++++-- drivers/mtd/spi-nor/core.h | 3 ++ drivers/mtd/spi-nor/debugfs.c | 2 +- drivers/mtd/spi-nor/sfdp.c | 27 ++++++++++++++ drivers/mtd/spi-nor/sfdp.h | 2 -- drivers/mtd/spi-nor/sysfs.c | 20 ++++++++++- include/linux/mtd/spi-nor.h | 3 ++ 8 files changed, 92 insertions(+), 6 deletions(-)