Received: by 2002:a05:6359:322:b0:b3:69d0:12d8 with SMTP id ef34csp89480rwb; Wed, 10 Aug 2022 15:27:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR4iIEyM2sQwr26gbpLj+UuA+fMM8/EbYqn7DZrwkGtDpOHxLBnR50bkzhAf7D6ObpBbePka X-Received: by 2002:a17:90a:9dc7:b0:1f3:1a8:41a1 with SMTP id x7-20020a17090a9dc700b001f301a841a1mr5816868pjv.23.1660170469415; Wed, 10 Aug 2022 15:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660170469; cv=none; d=google.com; s=arc-20160816; b=C28bnRUktVrro6qzu+G4312Kh56l6u3oGXLuQ/d5WmSCbJAStH0PeoRovZKcriSwFf 3getEUl5zIXI2HjbSjygCm2NnzOm+vIaDfPHgYxDuVi5/ypCM5fsv9C8GboHI0VnI0N6 0uCxVzf/deZrhbHPc5Nv62PfCdwLBreea3olX5S1Dl1lbKXHR4MGzaqmi21MqfJetEbL Kgwpi/Dnz1C7yAATRiiV0KXKaMfigF682qVaGa6fzc1oqhjKOdcF18PWRo9Mqmn6A1xt MHqILni3YYkiX8IMUox6a9y/If1PJh7Ma8TC+Q6yYuvKGHS4py+p8pf0DZpEc1t9wbOG Ep+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=NqeFnD6tHk0Apg0ipYoUap63hcDSdx+M2oLGDxmnAGA=; b=InQoPBGUNXv72Me7m/Rz/BY1HnqsQi3TZrbpQNP6E5oisNK+d4GEppU/qgcWrB2XWj O7TZDTzkVbsVs1PlUkJug7pr8mmGf3RONiuuDtqrRhCxt/JYieC9xonJ0LG89Tq+SX6i JPFswAmfwVecx3NIVlvpHke8FTmIsaoOusYs/JW3TXWuYrXqkKfAz35I4r1bOFz1XwCc unJ3Dtiyb2PXOJy51+YgXvX1roagC7VRETZVWUEZzueOE0H6T8ULYUXefe0X6eE/rc4d ygcoPCwoQ72zIDnFSVf0foDSGRMIseD4Qk0MGOx3/RYpmkLESOyaX2usU+4xfoMug7cK kyhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=Pc2ISALx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 124-20020a630582000000b003fe343c511esi17530293pgf.789.2022.08.10.15.27.35; Wed, 10 Aug 2022 15:27:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=Pc2ISALx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233238AbiHJWHQ (ORCPT + 99 others); Wed, 10 Aug 2022 18:07:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231191AbiHJWHN (ORCPT ); Wed, 10 Aug 2022 18:07:13 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C29B1792DA for ; Wed, 10 Aug 2022 15:07:09 -0700 (PDT) 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(-) -- 2.30.2