[U-Boot-Users] [PATCH] New NAND subsystem: mtd like commands support jffs2 and bad blocks

Guido Classen clagix at gmail.com
Fri Oct 6 17:09:22 CEST 2006


Hello Ladis,
hello list,

the attached patch implements several improvements to the new NAND subsystem:

JFFS2 related commands:

  implement "nand erase clean" and old "nand erase"
  using both the new code which is able to skip bad blocks
  "nand erase clean" additionally writes JFFS2-cleanmarkers in the oob.

  "nand write.jffs2"
  like "nand write" but skip found bad eraseblocks

  "nand read.jffs2"
  like "nand read" but skip found bad eraseblocks

Miscellaneous and testing commands:
  "markbad [offset]"
  create an artificial bad block (for testing bad block handling)

  "scrub [offset length]"
  like "erase" but don't skip bad block. Instead erase them.
  DANGEROUS!!! Factory set bad blocks will be lost. Use only
  to remove artificial bad blocks created with the "markbad" command.


NAND locking command (for chips with active LOCKPRE pin)

  "nand lock"
  set NAND chip to lock state (all pages locked)

  "nand lock tight"
  set NAND chip to lock tight state (software can't change locking anymore)

  "nand lock status"
  displays current locking status of all pages

  "nand unlock [offset] [size]"
  unlock consecutive area (can be called multiple times for different areas)


I have tested the code with board containing 128MiB NAND large page chips
and 32MiB small page chips.

CHANGELOG:
* Several improvements to the new NAND subsystem: JFFS2 related commands
  implemented in mtd-utils style, support for bad blocks, bad block testing
  commands, NAND lock commands
  Patch by Guido Classen, 06 Oct 2006



Regards

  Guido
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nand-jffs2.patch.gz
Type: application/x-gzip
Size: 8920 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20061006/49569b42/attachment.bin 


More information about the U-Boot mailing list