gpmi-nand driver and jffs2 support

Marek Vasut marex at denx.de
Sun Sep 29 18:52:46 EDT 2013


Dear Huang Shijie,

> 于 2013年09月24日 20:53, Marek Vasut 写道:
> > Hello Huang,
> > 
> >> 于 2013年09月24日 17:50, Marek Vasut 写道:
> >>> Hello Huang,
> >>> 
> >>> Can you please explain what is the exact difference between the NAND
> >>> layout when using JFFS2 in FSL 2.6.35 and in mainline with your patches
> >>> ?
> >> 
> >> In FSL 2.6.35, there are some free space in the OOB;
> >> while in mainline we use all the free space in the OOB.
> > 
> > OK, let me understand this in more detail.
> > 
> > How does the NAND page look when written by FSL 2.6.35 and how does the
> > NAND page look when written by current mainline ? Can you please tell in
> > detail?
> 
> [1] for FSL 2.6.35, see gpmi_nfc_set_geometry():
>      The ecc_strength is set at a fix value, such as:
>            "set ecc_strength with 8 for page size 2048";
> 
>      Why set the ecc_strength with 8? just based on the experiences, not
> based on the
>      chip's datasheets.
> 
>      So we can have some spare space in the OOB, after we setting the
> BCH with the ecc_strength.
> 
> [2] for mainline, see common_nfc_set_geometry():
>      Please see the diagrams in the set_geometry_by_ecc_info() and
> legacy_set_geometry().
> 
> 
>      If we CAN use the ecc info from the chip's datasheet, just like in
> FSL_2.6.35, we may
>      have some spare space in the OOB; else we use all the OOB.

This is the vital information, thank you!

So by applying this [1] and calling the legacy_set_geometry() instead of 
set_geometry_by_ecc_info(), I can get the JFFS2 to work. Nice, thanks again!

[1] http://lists.infradead.org/pipermail/linux-mtd/2007-December/020047.html
 
> >>> Is there any way to mount JFFS2 written with FSL 2.6.35 on current
> >>> mainline? Thus far, neither me nor Hector were able to mount such
> >>> partition with the same result.
> >> 
> >> The gpmi driver in FSL 2.6.35 is different from the mainline.
> > 
> > I was under the impression the mainline driver is an evolution of the FSL
> > 2.6.35 driver. Is this assumption incorrect?
> 
> yes.
> 
> >> The two drivers are not compatible to each other.
> > 
> > OK, like I said, if we cannot produce a drop-in replacement of old FSL
> > 2.6.35 kernel, this is a problem. People will come and they will be
> > running into this issue. Thus, let us focus on producing a compatible
> > JFFS2 patch.
> 
> I do not think it is a problem. The FSL 2.6.35 does not support the JFFS2.

It does for SLC NAND.

Best regards,
Marek Vasut



More information about the linux-mtd mailing list