Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2693011pxb; Tue, 13 Apr 2021 08:01:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUYTIpdVwIb4rkQJL+fOB42jKnUgmoZv33mhQByKKy3UzACEuEL6OlldyNR826bf5GSP0/ X-Received: by 2002:a50:d5d9:: with SMTP id g25mr35731378edj.47.1618326118483; Tue, 13 Apr 2021 08:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618326118; cv=none; d=google.com; s=arc-20160816; b=dD3eWeAjMKvcAkXaqtk+Kn7XqW00uu4+7SHzKqijFPy/tVF0EgNR5Ur8bu334PepmX tPso8qqbEQa1Gm7IxCt3ZNg8cF9uwaMUlZ4awJT+77ME8HP5C1UjrDnKhVIxeCYHIFP7 acDi6k2gui4QS5QKCrOZzIZQ92l49omjZvi4K9vTgf6TMirSoZU1RapatX1igCC4vbvk 85LUJkGghLpAAjLgXqyfRz4y4DxOpkZLgfNKzJ7Mz/iBhP+KUUvd42ssWoIB7XpH89MO 9C4Bo4haUWAEsQB78CZZaa/PbHP8DDsqfM6XLwiRcD04+xN/A55rGnvVPBVgSeG3R1Nw x8+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=SWjqpxaDjBEgNZflrVYP73ahhMwX1Hw7GOz/1ERNy/U=; b=m3Jopj71CzCpcY4VSWAd4oMMsXI7yhYA8eNKaBXvShX61DXQoEtvV0swXaZdZfXbWt a8qU4PLxFYGlaeIEcCijXHQ5ge41Ytt15vzX178PeeDjLzKOQVbiC2cIb4OiLPLx1WTc V+Kcnup0Tc2CI3g6DfH1O640q5dmSh5M2aZ9nyo/0A4jLD59bi3eF5ylPNwP4gpyoE/s 5RUweY/7Gpkb9oIdZR1fX1h59a6gRRudeVCYLptsEr5qUhRVMCw1C+ryub0lmCvGSTRL QFRlk1qq+XsAmmXqncGgbk60YZiSyHX8lo4HUlqgTk5V4URYJVUmvP6LO8MdZmNUsJfw zbxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=gtUln0ME; 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 n6si10118733edq.492.2021.04.13.08.01.34; Tue, 13 Apr 2021 08:01:58 -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=gtUln0ME; 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 S1345520AbhDMM1O (ORCPT + 99 others); Tue, 13 Apr 2021 08:27:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345513AbhDMM1E (ORCPT ); Tue, 13 Apr 2021 08:27:04 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 996B6C061756 for ; Tue, 13 Apr 2021 05:26:42 -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 507C322234; Tue, 13 Apr 2021 14:26:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1618316796; 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=SWjqpxaDjBEgNZflrVYP73ahhMwX1Hw7GOz/1ERNy/U=; b=gtUln0MEqe5mYsb0ajXauJ4K9EeO/Nn020Z8jGHw+gadnSzP9DaBTsdDui/Q82OiW8r5PF U6Xz+LOKcPdVVWQoewfuQp3tX9lIQuGUserWkvxV0qgfcQrXxRcRdwpO0G7pZETseNFyDo 6vb5TsrwEDtPaR08p6rmJcw9yNraXNM= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 13 Apr 2021 14:26:36 +0200 From: Michael Walle To: Ikjoon Jang Cc: linux-mtd@lists.infradead.org, Miquel Raynal , Pratyush Yadav , Richard Weinberger , Tudor Ambarus , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: spi-nor: macronix: Add block protection support to mx25u6435f In-Reply-To: <20210413120210.3671536-1-ikjn@chromium.org> References: <20210413120210.3671536-1-ikjn@chromium.org> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <51761f1db840c51bad17f5f275b4ce1a@walle.cc> X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ikjoon, Am 2021-04-13 14:02, schrieb Ikjoon Jang: > This patch adds block protection support to Macronix mx25u6432f and > mx25u6435f. Two different chips share the same JEDEC ID while only > mx25u6423f support section protections. And two chips have slightly > different definitions of BP bits than generic (ST Micro) > implementation. What is different compared to the current implementation? Could you give an example? > So this patch defines a new spi_nor_locking_ops only for macronix > until this could be merged into a generic swp implementation. TBH, I don't really like the code duplication and I'd presume that it won't ever be merged with the generic code. You also assume that both the WPSEL and T/B bit are 0, which might not be true. Please note that both are write-once, thus should only be read. See also: https://lore.kernel.org/linux-mtd/346332bf6ab0dd92b9ffd9e126b6b97c@walle.cc/ -michael