Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2083729pxk; Mon, 14 Sep 2020 04:26:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyq60kQ5FAJeAoua0LJtQ7SCAiK+9zDLiDqEkk/cZwW89WhIL9IvO0Hc8zuPFYketqtuVDP X-Received: by 2002:a17:906:c309:: with SMTP id s9mr15029161ejz.167.1600082795054; Mon, 14 Sep 2020 04:26:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600082795; cv=none; d=google.com; s=arc-20160816; b=B76sZ70MEX8BYhdq95R9t+oITbKMn3TLqOGLOKEAUzuRYPj7gfq5TNAcIMaqEIdp35 F6lfXPA45mn5JfF8GjSib7g3ZzoH7MHZO31Gxu7UEROx6/pOwIfrhQpsm2jw0tF3BZD0 366QGFHqp2NrtpbzFGItGs4em/3t3dWoBOmBtglYtkBrJQLhgVSJP4WDgE4Yj82pEy18 OP6f8Bih71/McuL3ue87qYXMDGdLsphHOSJDAICNeXaU8DNSs5yo4iNASy33T+ASekvu m2JSTxw/527YIF1GHNHaUG2Geokpp1tSDNEPHTOG/9l2oSnwfKoml+rczVHBhiMejXzs +/sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=TSIenT/eAdfWHsMzr+7fvwJvSwJevHUBTg8/EDHXEAI=; b=kmGDqIuHpBRlSzpxHuSUZfkhk7FZlNSmDwAzJ4TGWM7AJWEaS9Yz8o9+VB7LLZZMeJ qgaFBFG8fFLNL6v3XtbE0gZrcKhbTj4T22g5m7gDEPANB3cDsfruDeb6W1wAwb78IuBj iDDryOGnhrWnVyhrJfvqrfmALnmgQ4tyUGGAMDs5R4zGWpvWh3PmlyvyXC//SKl9KXAL BRgPHdf1a1mwE4dUe7R4O5O7xnpdUj9TXZWrVTXvN73qF6+YWaCftqdMiOoMwbnza/qa SRAN1HLqXFTgOBhc71z3J8UmJe1QWHFnn5HT7dtt6kdXqK5t7A/hykgIkvD6RsbrRFQv LaFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=WbXvk1B0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yd22si7874604ejb.346.2020.09.14.04.26.13; Mon, 14 Sep 2020 04:26:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=WbXvk1B0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726049AbgINLZB (ORCPT + 99 others); Mon, 14 Sep 2020 07:25:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725984AbgINLYh (ORCPT ); Mon, 14 Sep 2020 07:24:37 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98D7AC06174A for ; Mon, 14 Sep 2020 04:24:36 -0700 (PDT) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id ADD1C2250C; Mon, 14 Sep 2020 13:24:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1600082671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TSIenT/eAdfWHsMzr+7fvwJvSwJevHUBTg8/EDHXEAI=; b=WbXvk1B0PQEhKBAqE5pX/daD7i4tV8zaQsMadEivSvPhV4tUoEeoBeBAtKNQ8AsDD6sq2C 30H8jvQKhIO2M334SGFHZJluZ3NdqUlyV9UOnANuwI6yIoZsk/mET0hdZn6oyHDq91IhAI LgQRf+K8/cAl8j8PhrNLh8JonEfb2uU= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 14 Sep 2020 13:24:30 +0200 From: Michael Walle To: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , Jungseung Lee Subject: Re: [PATCH v2 0/4] mtd: spi-nor: OTP support In-Reply-To: <20200911222634.31804-1-michael@walle.cc> References: <20200911222634.31804-1-michael@walle.cc> User-Agent: Roundcube Webmail/1.4.8 Message-ID: X-Sender: michael@walle.cc Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2020-09-12 00:26, schrieb Michael Walle: > This patchset implements the MTD OTP functions to allow access to the > SPI > OTP data. Specific support is added for the Adesto, Macronix and > Winbond > flash chips. > > In the past there was already an attempt by Rahul Bedarkar to add this, > but > there was no response. These patches are slightly based on his work. > > https://lore.kernel.org/linux-mtd/1489754636-21461-1-git-send-email-rahul.bedarkar@imgtec.com/ > I've missed appending the changelog: changes since v1: - rebased to latest tree - correctly check return code of otp_ops->is_locked() in spi_nor_mtd_otp_info() - use correct bouncebuf for spi command in spi_nor_otp_lock_sr2() - add cleanup patch to consolidate some of the "if (spimem) {} else {}" patterns - add otp support for macronix and similar flashes - moved otp code into core.c because it is used across different vendors - use generic naming, eg. spi_nor_otp_lock_sr2() instead of winbond_otp_lock() -michael > Michael Walle (4): > mtd: spi-nor: cleanup common code > mtd: spi-nor: add OTP support > mtd: spi-nor: implement OTP support for Macronix and similar flashes > mtd: spi-nor: implement OTP support for Winbond and similar flashes > > drivers/mtd/chips/Kconfig | 2 +- > drivers/mtd/spi-nor/atmel.c | 13 +- > drivers/mtd/spi-nor/core.c | 769 ++++++++++++++++++++++++--------- > drivers/mtd/spi-nor/core.h | 61 +++ > drivers/mtd/spi-nor/macronix.c | 13 +- > drivers/mtd/spi-nor/winbond.c | 18 +- > include/linux/mtd/spi-nor.h | 16 + > 7 files changed, 676 insertions(+), 216 deletions(-)