From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrei Yakimov Date: Wed, 20 May 2015 20:03:47 -0700 Subject: [U-Boot] Fix fsl_elbc_nand driver In-Reply-To: <1432176380.27761.182.camel@freescale.com> References: <1432001789.14341.120.camel@andreilinux> <1432071614.27761.77.camel@freescale.com> <1432074568.14341.149.camel@andreilinux> <1432075134.27761.82.camel@freescale.com> <1432078969.14341.178.camel@andreilinux> <1432160719.27761.108.camel@freescale.com> <1432171628.14341.246.camel@andreilinux> <1432172233.27761.147.camel@freescale.com> <1432173354.14341.258.camel@andreilinux> <1432175221.27761.176.camel@freescale.com> <1432176178.14341.267.camel@andreilinux> <1432176380.27761.182.camel@freescale.com> Message-ID: <1432177427.14341.279.camel@andreilinux> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 2015-05-20 at 21:46 -0500, Scott Wood wrote: > On Wed, 2015-05-20 at 19:42 -0700, Andrei Yakimov wrote: > > For now lets stick with 1536 in u-boot. > > I will send a patch. > > At least it will not loosing flash over time > > as nand ages. > > > > I understand what you wish, and will take a look > > on it inside fresh new kernel. I found one more driver - > > marvel looks like have same problem. > > I will check how NAND_CMD_RNDOUT is working. > > Perhaps we do not need extra read_param(), > > and use only NAND_CMD_RNDOUT to get next > > block inside page loop. > > Again, I'm a reluctant to use RNDOUT in the default read_param() because > that would change the flow for all controllers and chips, and while the > chip manual I'm looking at says it's OK, it introduces risk that it > doesn't work everywhere (e.g. some controller drivers that provide their > own cmdfunc don't implement RNDOUT). Forget about read_param(), just like this: for (i = 0; i < 3; i++) { for (j = 0; j < sizeof(*p); j++) ((uint8_t *)p)[j] = chip->read_byte(mtd); if (onfi_crc16(ONFI_CRC_BASE, (uint8_t *)p, 254) == le16_to_cpu(p->crc)) { break; } chip->cmdfunc(mtd, NAND_CMD_RNDOUT, 0, -1); } and this is good - will be "no op" or "bad command" error, which could be ignored - so for this drivers operation flow is unchanged. > -Scott > > I am still learning git/patman. It will be day or two while I figure out patman. By some reason after "git commit --amend" patman kill my patch. I am missing something. Andrei