Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2660377imb; Mon, 4 Mar 2019 10:40:38 -0800 (PST) X-Google-Smtp-Source: APXvYqxDtQD1nBxbllSeziCMYbkABq/K9iNa+uhya4PMhhhazO93C/NKFWA41yUDVUDVR9+AgWlc X-Received: by 2002:a63:4d4f:: with SMTP id n15mr19850693pgl.327.1551724838627; Mon, 04 Mar 2019 10:40:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551724838; cv=none; d=google.com; s=arc-20160816; b=ftHnudKr0lfIEnjQ94JKRWBYtRQ4DHTxvzidgqaq9m0c9lwl+l6X9gfBKdGRD1DDKN qu2NGEjOec0EjVrFFfBDmxsx80SW/4axmvbOV1oQtN320iAsJgZt5dpCslDoOu+huge+ 4O342dHRFhl0warXU8y07W1C0LwSpY7gvvUcnW3rbg/o9BMORHhnJ4aQJZFkHd7rhsML bs8OOKHgQeWUQetBHYoZFJ8FQXzSeSC33a/7XdaQZcu+LM3B4Ugptqa76jCsNcliFcRE +wH0M032jekzkZeH5ZMpWIzkf8EUKwUMbmcXogYVwm1odqzs8B0pLhPmb7HYViBad+GG IjoA== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=GKx2RxQ6esHK5o+OEH+ydr6Kp0iLsmp3YepKjuStZMo=; b=GRRxX8XRt76ZPZ/EUjd5rXXjx1t8s9sAMvVOj4tMVQDnoxOXJZUc6uvhoHUCVTxdIL GOG1r5Y8jqqE8Ku4ib5PcuCpDlrU7jlLsl3NWNE0vMD6r+aImVl1E8Fu18iRb/dYA37G AXYOnr80Q7MouDCd2l2z7ehQga4tDSmOzvUzUvsDmDiAtIgoao4K4Alrd+DTr1T985AQ 4FApQq3iNXp2mRf2+cw6E7YjxQ2adftjyU2pKsKr5OlWrGThpWotYXMVnIVVQAlxAiWV OF5TTvLSpvXjIrqlVd3CpCe+GEAZzKIws//UZJ+7g4vXMPqh++EQpaQCeiu7Zx8zqVj+ mbtw== 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 a11si5734505pff.126.2019.03.04.10.40.23; Mon, 04 Mar 2019 10:40:38 -0800 (PST) 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 S1727656AbfCDSOE convert rfc822-to-8bit (ORCPT + 99 others); Mon, 4 Mar 2019 13:14:04 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:46027 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727205AbfCDSOE (ORCPT ); Mon, 4 Mar 2019 13:14:04 -0500 Received: from xps13 (136.87.136.77.rev.sfr.net [77.136.87.136]) (Authenticated sender: miquel.raynal@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 84F80240003; Mon, 4 Mar 2019 18:13:56 +0000 (UTC) Date: Mon, 4 Mar 2019 19:13:49 +0100 From: Miquel Raynal To: "Shivamurthy Shastri (sshivamurthy)" Cc: Boris Brezillon , "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Chuanhong Guo , "Richard Weinberger" , Schrempf Frieder , Marek Vasut , Frieder Schrempf , Brian Norris , David Woodhouse , "Bean Huo (beanhuo)" Subject: Re: [EXT] Re: [PATCH 2/2] mtd: spinand: micron: Support for all Micron SPI NAND flashes Message-ID: <20190304191349.71f8b147@xps13> In-Reply-To: References: <20190204190151.2c7987b7@bbrezillon> Organization: Bootlin X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, "Shivamurthy Shastri (sshivamurthy)" wrote on Mon, 4 Mar 2019 13:29:21 +0000: > Hi Boris, > > > -----Original Message----- > > From: Boris Brezillon > > Sent: Monday, February 4, 2019 7:02 PM > > To: Shivamurthy Shastri (sshivamurthy) > > Cc: Miquel Raynal ; linux- > > mtd@lists.infradead.org; linux-kernel@vger.kernel.org; Chuanhong Guo > > ; Richard Weinberger ; Schrempf > > Frieder ; Marek Vasut > > ; Frieder Schrempf > > ; Brian Norris > > ; David Woodhouse > > ; Bean Huo (beanhuo) > > Subject: [EXT] Re: [PATCH 2/2] mtd: spinand: micron: Support for all Micron > > SPI NAND flashes > > > > Hi Shivamurthy, > > > > On Mon, 4 Feb 2019 11:17:51 +0000 > > "Shivamurthy Shastri (sshivamurthy)" wrote: > > > > > Driver is redesigned using parameter page to support all the Micron > > > SPI NAND flashes. > > > > Do all Micron SPI NANDs really expose a valid ONFI param page? If > > that's not the case, then relying on ONFi parsing only sounds like a > > bad idea. > > Micron SPI NAND datasheet does not confirm to be as ONFI standard. > However, they all expose parameter page, which I used for development. > > > > > > > > > Parameter page of Micron flashes is similar to ONFI parameter table and > > > functionality is same, so copied some of the common functions like crc16 > > > and bit_wise_majority from nand_onfi.c. > > > > Most of the code is generic and does not depend on the spinand layer, > > plus, we already have ONFI param page parsing code in > > drivers/mtd/nand/raw/ which you're intentionally duplicating in a > > version that will not be re-usable by the raw NAND layer even after > > converting it to use the generic NAND layer. > > > > Please move ONFi parsing code to drivers/mtd/nand/onfi.c and make it > > generic. > > As I said before, it is not compliant to ONFI standard, I think it is better not > to make it generic. For what I see it is too similar to copy all that code. I agree with Boris. If there are some specificities that are not in the ONFI standard you can do some late changes in the parameter page from Micron's driver I guess? Thanks, Miquèl