Hello, "Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@xxxxxxxxxx> wrote on Mon, 4 Mar 2019 13:29:21 +0000: > Hi Boris, > > > -----Original Message----- > > From: Boris Brezillon <bbrezillon@xxxxxxxxxx> > > Sent: Monday, February 4, 2019 7:02 PM > > To: Shivamurthy Shastri (sshivamurthy) <sshivamurthy@xxxxxxxxxx> > > Cc: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>; linux- > > mtd@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Chuanhong Guo > > <gch981213@xxxxxxxxx>; Richard Weinberger <richard@xxxxxx>; Schrempf > > Frieder <frieder.schrempf@xxxxxxxxxx>; Marek Vasut > > <marek.vasut@xxxxxxxxx>; Frieder Schrempf > > <frieder.schrempf@xxxxxxxxx>; Brian Norris > > <computersforpeace@xxxxxxxxx>; David Woodhouse > > <dwmw2@xxxxxxxxxxxxx>; Bean Huo (beanhuo) <beanhuo@xxxxxxxxxx> > > 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@xxxxxxxxxx> 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/