[PATCH] Towards DiskOnChip support as a NAND driver

Dan Brown dan_brown at ieee.org
Wed Jun 16 10:19:00 EDT 2004

For review and testing, here is a patch which brings us a step closer to
proper support for DiskOnChip devices.  This is against the 20040615

This patch includes the following:

    - Fix pipeline problems for DOC2000 and Millenium/2000TSOP (only tested
on 2000TSOP)
    - Add bad block table (read-only) support for INFTL-based devices (only
2000TSOP for the moment)
    - Add hardware ECC support for DOC2000 and Millenium/2000TSOP (only
tested on 2000TSOP and needs more testing!)
    - Add auto-partitioning for INFTL-based devices (should be made

    - Add support for DiskOnChip hardware ECC
    - Fix a null-pointer ref that occurs if a NAND driver supplies a primary
but not a mirror BBT descriptor

    - Add a return value to calculate_ecc.  This is used by nand_base to
skip the call to correct_data if we know there are no errors.  (This saves a
6-byte comparison-against-zero when using DOC.  Is it worth changing the API
for it?  You tell me.)


Please realize that this needs a lot more testing.  I still haven't gotten
JFFS2 to run properly with this (though I suspect that may reflect my
inexperience with JFFS2).  Also, the change to nand.h may break other nand
drivers (though the fix is trivial).

Things that aren't done yet:
    - BBT support for NFTL-based devices (coming soon!)
    - BBT updating (not important when using (I)NFTL filesystem, but matters
for JFFS2)
    - Auto-partitioning for NFTL-based devices?
    - DOC Millenium Plus support
    - Proper BBT handling for multi-floor INFTL devices (don't try it with
the current code!)
    - Modifying (I)NFTL to use the nand-based DiskOnChip driver
    - Modifying JFFS2 to use autooob layout?  (Not sure about this)
    - Modifying flash_eraseall to use autooob layout?  (Should work OK on
DOC by coincidence)
    - Adding the nand/diskonchip driver into the kernel build system instead
of the old one

    - More testing.


    -Dan Brown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: docnand.diff
Type: application/octet-stream
Size: 15585 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20040616/57fa9f8a/attachment.obj 

More information about the linux-mtd mailing list