Hello, "Shivamurthy Shastri (sshivamurthy)" <[email protected]> wrote on Mon, 4 Mar 2019 13:29:21 +0000:
> Hi Boris, > > > -----Original Message----- > > From: Boris Brezillon <[email protected]> > > Sent: Monday, February 4, 2019 7:02 PM > > To: Shivamurthy Shastri (sshivamurthy) <[email protected]> > > Cc: Miquel Raynal <[email protected]>; linux- > > [email protected]; [email protected]; Chuanhong Guo > > <[email protected]>; Richard Weinberger <[email protected]>; Schrempf > > Frieder <[email protected]>; Marek Vasut > > <[email protected]>; Frieder Schrempf > > <[email protected]>; Brian Norris > > <[email protected]>; David Woodhouse > > <[email protected]>; Bean Huo (beanhuo) <[email protected]> > > 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)" <[email protected]> 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

