gpmi-mtd ecc regression

Marek Vasut marex at denx.de
Tue Oct 22 22:33:33 PDT 2013


Dear Huang Shijie,

> 于 2013年10月19日 01:03, Tim Harvey 写道:
> > Huang,
> > 
> > The patch you made to obtain ECC info from the chip
> > (http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/dr
> > ivers/mtd/nand/gpmi-nand?id=2febcdf84b75aae627c61f0a5bf531a69299966c) has
> > caused a regression for an i.MX6 board I'm working with that uses NAND
> > and ubifs.
> > 
> > I'm using a Micron MT29F8G08
> > (http://download.micron.com/pdf/datasheets/flash/nand/2_4_8gb_nand_m49a.p
> > df) which has:
> > page size: 2112 bytes (2048 + 64 bytes)
> > block size: 1056 words (1024 + 32 words)
> > plane size: 2 planes x 1024 blocks per plane
> > device size: 2Gb: 2048 blocks
> > ecc: 4bit
> > 
> > The legacy_set_geometry function comes up with:
> > gf_len=13
> > ecc_strength=8
> > page_size=2112
> > metadata_size=10
> > ecc_chunk_size=512
> > ecc_chunk_count=4
> > payload_size=2048
> > auxiliary_size=16
> > auxiliary_status_offset=12
> > block_mark_byte_offset=1999
> > 
> > and the new set_geometry_by_ecc_info comes up with:
> > gf_len=13
> > ecc_strength=4
> > page_size=2084
> > metadata_size=10
> > ecc_chunk_size=512
> > ecc_chunk_count=4
> > payload_size=2048
> > auxiliary_size=16
> > auxiliary_status_offset=12
> > block_mark_byte_offset=2018
> > block_mark_bit_offset=4
> > 
> > There are two discrepancies above:
> >   a) ecc_strength - this part has 4bit ecc but being detected as 8?
> >   b) page_size - the legacy function includes oob in page size, and the
> > 
> > new one does not
> > 
> > which is correct?
> 
> In theory, both are correct.
> 
> I am in an embarrass state now:
> [1] we can support the jffs2, when we use the set_geometry_by_ecc_info()
> to set the NAND layout.
> 
> [2] if we still use the legacy_set_geometry() to set the NAND layout, we
> can not support the jffs2 for GPMI.

It's exactly the other way around if you're talking about JFFS2 compatibility 
with the 2.6.35 FSL kernel ;-)



More information about the linux-mtd mailing list