Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp891043imm; Fri, 8 Jun 2018 06:54:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLf17JfQabS/i+BJpmfNT9frjRae2M2GY8aQ1AwjoBAveMkS4F66uK0b++uXheR2YVlGbBq X-Received: by 2002:a17:902:b195:: with SMTP id s21-v6mr6754986plr.202.1528466087139; Fri, 08 Jun 2018 06:54:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528466087; cv=none; d=google.com; s=arc-20160816; b=n////zpYp8/vN4CIEuZ1F1FMvKmuPgCIlS46fbFT1HyLZB33AIj5FXv3/oPXPedxwt evYoyd43RJQgE7Wep0FVxJSKCFF2X7fORtT/YiODlGns2EG8Yrek+TtrO666Rh0ma0yk Xy73lhp+cd+JziiZMlXkPMSg9ir8wsvMtjHr3vjIkrkI0jZNapwl0nwBBtCALX+E/h0W yK5mABivcwNllYgkTkizLGffGpQaxgRLeDcNfP7jd7Z05aRH8reKDc2YxXE7xWhclVo3 +JpkEAG97kgMG2LIQfLsk07lHcNSjhatPEy+eZ/uGYqqf8ZWtlgbLVGdc3Uowy4JHu3W H48w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=A1fAIbbEHPY3Tq6fJyFvEMgI4r6pcFzmGBjAWq5fsfQ=; b=JGwEUrdxneZKxgmmj2QZbXVolyzOBSBhAW33O0Q9NpKyu7NX/uDkF0Ci4fv3WJWT8D 3BeFnX3lA+089KfvK1Sn+B29I9Bq2uiqppPR0QI/dvSS47LyvYg0K28B8pQ0glKKvh1i FAN7qJaLiQXH2fBFS5AGg2J0iMXIkP7Gb/IH6RpwAsd0LokFEhq6h3a+YoqLCGrjsLmF +0R2enmLFC33Kj0puo/+fqXXpRzzq/FnadPIdvgjxUdVeg0cYk1jTWblIUalE7f6fr7a 9IA0FeK9XTbFdObmaCh781AKNCsu+/FkauyT4wnbldj8UxDJ4O4NMIgS7qCrv6RCTP4b 8b+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 65-v6si56458539pfo.229.2018.06.08.06.54.32; Fri, 08 Jun 2018 06:54:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751846AbeFHNyF (ORCPT + 99 others); Fri, 8 Jun 2018 09:54:05 -0400 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:31178 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751133AbeFHNyE (ORCPT ); Fri, 8 Jun 2018 09:54:04 -0400 X-IronPort-AV: E=Sophos;i="5.49,490,1520924400"; d="scan'208";a="14762806" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Jun 2018 06:54:04 -0700 Received: from [10.159.245.163] (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Fri, 8 Jun 2018 06:54:03 -0700 Subject: Re: [PATCH] add support to non-uniform SFDP SPI NOR flash memories To: Tudor Ambarus , , , , , CC: , , , References: <20180608134818.21387-1-tudor.ambarus@microchip.com> From: Cyrille Pitchen Message-ID: Date: Fri, 8 Jun 2018 15:54:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180608134818.21387-1-tudor.ambarus@microchip.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tudor, Le 08/06/2018 à 15:48, Tudor Ambarus a écrit : > The commit message became wall-of-text, my feeling is that I heavily > reworked the code so I changed the author. If someone thinks differently, > please say and I'll change back to the initial authorship. What I've done: It's obvious that you're the author of the patch so I'm totally fine with this change :) Best regards, Cyrille > > - minimize the amount of erase() calls by using the best sequence of erase > type commands depending on alignment. > > - build the list of best fitted erase commands to be executed once we > validate that the erase can be performed. > > - add improvements on how the erase map is handled. The regions are > consecutive in the address space, walk through the regions incrementally. > > - speed up finding the best erase type command. Order erase types by > size, iterate them from the biggest to the smallest and stop when best > fitted command is found. > > - determine at init if there are erase types that can erase the entire > memory > > - fix the erase size in overlaid regions. S25FS512S states that 'if a sector > erase command is applied to a 256KB range that is overlaid by 4KB secors, > the overlaid 4kB sectors are not affected by the erase' > > Backward compatibility test done on MX25L25673G. > > Changes since RFC PATCH: > - build a list of erase commands to be executed once we validate > that the erase can be performed > - fix walking through the address space in overlaid regions > - drop wall-of-text description commit message, change author > > > Tudor Ambarus (1): > mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories > > drivers/mtd/spi-nor/spi-nor.c | 357 ++++++++++++++++++++++++++++++++++++++++-- > include/linux/mtd/spi-nor.h | 108 +++++++++++++ > 2 files changed, 451 insertions(+), 14 deletions(-) >