Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1759985pxk; Tue, 1 Sep 2020 07:11:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzY96rFxhANMtbDxdMQ37UEJDbi4koGVnGiBVsmsycEaNhgpxTyHFos/0UYftOlIBroQbwX X-Received: by 2002:aa7:d34b:: with SMTP id m11mr1954325edr.178.1598969513857; Tue, 01 Sep 2020 07:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598969513; cv=none; d=google.com; s=arc-20160816; b=FBCHLCKO1LqJnpVLQPZBsEV6bMWYYFAIAAdE0Cv5zmnY+/gedqfcwU0oUMZ2nBmEvJ q10ACFHmXuA8RbrCXhdgpAG+Zc9zv2AssN1evBQ+7c+DwwTk1syjeMPTYQBCOBL4rdWr ln9qHgKyxVZekNm8AU9BumkKCHCrB/3q4vSth1fwWzuTSXzdu14Y/+4x/8uXq6FYhfT6 k+b7DslTdpbMwf6nu6OIwagXLDyzbCBgdz/GlSE1wNAlovMutUfuTBjeCmTWVoPLzca6 nHNLl0Z3GXBizqg5sNO4gVofwEcOQXAwnPYPqjFVfjoyu+oQlU19yooCHDYGpsM8ewVS jAXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=o/QoU7LiMaYGlp9XTmuVO2eNJd18wG0Ka+M9mjIwoVo=; b=XPSxOcV6J8J5/VSkj8xz/xx8+RKXOw99r4Fqbnt/cRWbwU5H+lOxOzUFSmCuvRWH0U MTjJVc3rMv2CsDiK/m2U+VWzCML/yO9iq8zDqYOA/K1SL6xhH7KL4iRHvGXkAnMMOXEt 6VV2LKOXv+1Au67OazJxqZSIKcOuyaSt6at5poF1jQqgzdGFoMDH0YiUjk7otMs//809 aLyorqKWrx0BP6zth8xZ3IS5IbG54v06xuAoZG0PS84Aflm13yZHAwTbrB8MClX2G0+Z gNlIewJGG381wV0Paq2Vrc4+pouK0appVeVFfrolIjR0FbQlsqsvItCqmr7HwSyKIE91 hICg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yadro.com header.s=mta-01 header.b=hv5Tpu+p; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yadro.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si728296ejr.18.2020.09.01.07.11.28; Tue, 01 Sep 2020 07:11:53 -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=@yadro.com header.s=mta-01 header.b=hv5Tpu+p; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yadro.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728229AbgIAOGj (ORCPT + 99 others); Tue, 1 Sep 2020 10:06:39 -0400 Received: from mta-02.yadro.com ([89.207.88.252]:49272 "EHLO mta-01.yadro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728289AbgIAOEX (ORCPT ); Tue, 1 Sep 2020 10:04:23 -0400 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id F272452195; Tue, 1 Sep 2020 14:03:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-transfer-encoding:mime-version:user-agent:content-type :content-type:organization:references:in-reply-to:date:date:from :from:subject:subject:message-id:received:received:received; s= mta-01; t=1598969019; x=1600783420; bh=Cio/AuAeW0HBrdL9zokO5x1JI loihymCKFdkc3tu5Rw=; b=hv5Tpu+pfEE+4TqMB+Tacv08S9E1AtZHx0I6ruCR/ 9VTvOFvazAaOvNVY2lYLMmlDfYxFPuYIMoJi0aRcIp8IHzhss3UB5BQdxCQvnaB6 gYi5qWsqNv/jjrY6YRGBig+QP/e/B9VCTbSRcokU83k8yH4dNx25zrTTPuOHUOgz FM= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jTjqBeJ6JhO5; Tue, 1 Sep 2020 17:03:39 +0300 (MSK) Received: from T-EXCH-02.corp.yadro.com (t-exch-02.corp.yadro.com [172.17.10.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 23F644C866; Tue, 1 Sep 2020 17:03:39 +0300 (MSK) Received: from localhost.localdomain (10.199.1.70) by T-EXCH-02.corp.yadro.com (172.17.10.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Tue, 1 Sep 2020 17:03:38 +0300 Message-ID: Subject: Re: [PATCH 2/2] mtd: spi-nor: enable lock interface for macronix chips From: Ivan Mikhaylov To: Rasmus Villemoes CC: Tudor Ambarus , Miquel Raynal , Richard Weinberger , "Vignesh Raghavendra" , , Date: Tue, 1 Sep 2020 17:06:59 +0300 In-Reply-To: References: <20200812151818.16699-1-i.mikhaylov@yadro.com> <20200812151818.16699-3-i.mikhaylov@yadro.com> Organization: YADRO Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.199.1.70] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-02.corp.yadro.com (172.17.10.102) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-08-31 at 12:55 +0200, Rasmus Villemoes wrote: > On 12/08/2020 17.18, Ivan Mikhaylov wrote: > > Add locks for whole macronix chip series with BP0-2 and BP0-3 bits. > > > > Tested with mx25l51245g(BP0-3). > > Hmm. I've tried adding support for locking on Macronix to U-Boot > ( > https://patchwork.ozlabs.org/project/uboot/patch/20200326114257.1782-3-rasmus.villemoes@prevas.dk/ > ), > but that was quite a bit more involved than this. Note in particular the > first part of my commit message: > > Macronix chips implements locking in (power-of-two multiple of) 64K > blocks, not as a fraction of the chip's size. > > At least, that was true for the chip I was interested in and the few > others whose data sheets I grabbed to double-check. So I'm a bit > skeptical that this can work out-of-the-box without introducing a new > struct spi_nor_locking_ops. > > Rasmus Rasmus, but there is already locking of power-of-two as I see from the code, I'll double check on hw. Also compared documentation n25q512ax3(micron, which HAS_LOCK) to mx25l25635e(macronix) and they have same block protection table bits for example. I'd be glad to hear from maintainers on this spot. Thanks.