lkml.org 
[lkml]   [2019]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [EXT] Re: [PATCH 2/2] mtd: spinand: micron: Support for all Micron SPI NAND flashes
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

\
 
 \ /
  Last update: 2019-03-04 19:14    [W:0.049 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site