Comments

From: Liu Shuo <b35362@freescale.com>
Flash_erase -j should fill discrete freeoob areas with required bytes
of JFFS2 cleanmarker in jffs2_check_nand_cleanmarker(). Not just fill
the first freeoob area.
The below is the result without this workaround:
JFFS2: Erase block at 0x00000000 is not formatted. It will be erased
JFFS2: Erase block at 0x00004000 is not formatted. It will be erased
JFFS2: Erase block at 0x00008000 is not formatted. It will be erased
JFFS2: Erase block at 0x0000c000 is not formatted. It will be erased
JFFS2: Erase block at 0x00010000 is not formatted. It will be erased
JFFS2: Erase block at 0x00014000 is not formatted. It will be erased
JFFS2: Erase block at 0x00018000 is not formatted. It will be erased
JFFS2: Erase block at 0x0001c000 is not formatted. It will be erased
JFFS2: Erase block at 0x00020000 is not formatted. It will be erased
JFFS2: Erase block at 0x00024000 is not formatted. It will be erased
JFFS2: Erase block at 0x00028000 is not formatted. It will be erased
...
Signed-off-by: Liu Shuo <b35362@freescale.com>Signed-off-by: Li Yang <leoli@freescale.com>
---
v2 : get length of availble freeoob bytes from oobinfo information,
not use the ioctl ECCGETLAYOUT which is being deprecated.
flash_erase.c | 46 +++++++++++++++++++++++++++++++++++++++-------
1 files changed, 39 insertions(+), 7 deletions(-)