All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@micron.com>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
	Richard Weinberger <richard@nod.at>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Schrempf Frieder <frieder.schrempf@kontron.De>,
	Marek Vasut <marek.vasut@gmail.com>,
	Frieder Schrempf <frieder.schrempf@exceet.de>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Chuanhong Guo <gch981213@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	"Bean Huo \(beanhuo\)" <beanhuo@micron.com>
Subject: Re: [EXT] Re: [PATCH 2/2] mtd: spinand: micron: Support for all Micron SPI NAND flashes
Date: Mon, 4 Mar 2019 19:13:49 +0100	[thread overview]
Message-ID: <20190304191349.71f8b147@xps13> (raw)
In-Reply-To: <MN2PR08MB5951EE4ACB78BAD12EDA5F76B8710@MN2PR08MB5951.namprd08.prod.outlook.com>

Hello,

"Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@micron.com> wrote on
Mon, 4 Mar 2019 13:29:21 +0000:

> Hi Boris,
> 
> > -----Original Message-----
> > From: Boris Brezillon <bbrezillon@kernel.org>
> > Sent: Monday, February 4, 2019 7:02 PM
> > To: Shivamurthy Shastri (sshivamurthy) <sshivamurthy@micron.com>
> > Cc: Miquel Raynal <miquel.raynal@bootlin.com>; linux-
> > mtd@lists.infradead.org; linux-kernel@vger.kernel.org; Chuanhong Guo
> > <gch981213@gmail.com>; Richard Weinberger <richard@nod.at>; Schrempf
> > Frieder <frieder.schrempf@kontron.De>; Marek Vasut
> > <marek.vasut@gmail.com>; Frieder Schrempf
> > <frieder.schrempf@exceet.de>; Brian Norris
> > <computersforpeace@gmail.com>; David Woodhouse
> > <dwmw2@infradead.org>; Bean Huo (beanhuo) <beanhuo@micron.com>
> > 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)" <sshivamurthy@micron.com> 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

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@micron.com>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Chuanhong Guo <gch981213@gmail.com>,
	"Richard Weinberger" <richard@nod.at>,
	Schrempf Frieder <frieder.schrempf@kontron.De>,
	Marek Vasut <marek.vasut@gmail.com>,
	Frieder Schrempf <frieder.schrempf@exceet.de>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	"Bean Huo (beanhuo)" <beanhuo@micron.com>
Subject: Re: [EXT] Re: [PATCH 2/2] mtd: spinand: micron: Support for all Micron SPI NAND flashes
Date: Mon, 4 Mar 2019 19:13:49 +0100	[thread overview]
Message-ID: <20190304191349.71f8b147@xps13> (raw)
In-Reply-To: <MN2PR08MB5951EE4ACB78BAD12EDA5F76B8710@MN2PR08MB5951.namprd08.prod.outlook.com>

Hello,

"Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@micron.com> wrote on
Mon, 4 Mar 2019 13:29:21 +0000:

> Hi Boris,
> 
> > -----Original Message-----
> > From: Boris Brezillon <bbrezillon@kernel.org>
> > Sent: Monday, February 4, 2019 7:02 PM
> > To: Shivamurthy Shastri (sshivamurthy) <sshivamurthy@micron.com>
> > Cc: Miquel Raynal <miquel.raynal@bootlin.com>; linux-
> > mtd@lists.infradead.org; linux-kernel@vger.kernel.org; Chuanhong Guo
> > <gch981213@gmail.com>; Richard Weinberger <richard@nod.at>; Schrempf
> > Frieder <frieder.schrempf@kontron.De>; Marek Vasut
> > <marek.vasut@gmail.com>; Frieder Schrempf
> > <frieder.schrempf@exceet.de>; Brian Norris
> > <computersforpeace@gmail.com>; David Woodhouse
> > <dwmw2@infradead.org>; Bean Huo (beanhuo) <beanhuo@micron.com>
> > 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)" <sshivamurthy@micron.com> 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

  reply	other threads:[~2019-03-04 18:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 11:17 [PATCH 2/2] mtd: spinand: micron: Support for all Micron SPI NAND flashes Shivamurthy Shastri (sshivamurthy)
2019-02-04 11:17 ` Shivamurthy Shastri (sshivamurthy)
2019-02-04 12:32 ` Emil Lenngren
2019-02-04 12:32   ` Emil Lenngren
2019-02-04 18:01 ` Boris Brezillon
2019-02-04 18:01   ` Boris Brezillon
2019-03-04 13:29   ` [EXT] " Shivamurthy Shastri (sshivamurthy)
2019-03-04 13:29     ` Shivamurthy Shastri (sshivamurthy)
2019-03-04 18:13     ` Miquel Raynal [this message]
2019-03-04 18:13       ` Miquel Raynal
2019-02-04 23:05 ` kbuild test robot
2019-02-04 23:05   ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190304191349.71f8b147@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=bbrezillon@kernel.org \
    --cc=beanhuo@micron.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=frieder.schrempf@exceet.de \
    --cc=frieder.schrempf@kontron.De \
    --cc=gch981213@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    --cc=sshivamurthy@micron.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.