1 /* Linux driver for NAND Flash Translation Layer */
2 /* (c) 1999 Machine Vision Holdings, Inc. */
3 /* Author: David Woodhouse <dwmw2@infradead.org> */
4 /* $Id: nftlcore.c,v 1.98 2005/11/07 11:14:21 gleixner Exp $ */
7 The contents of this file are distributed under the GNU General
8 Public License version 2. The author places no additional
9 restrictions of any kind on it.
14 #include <linux/kernel.h>
15 #include <linux/module.h>
16 #include <asm/errno.h>
18 #include <asm/uaccess.h>
19 #include <linux/miscdevice.h>
20 #include <linux/pci.h>
21 #include <linux/delay.h>
22 #include <linux/slab.h>
23 #include <linux/init.h>
24 #include <linux/hdreg.h>
26 #include <linux/kmod.h>
27 #include <linux/mtd/mtd.h>
28 #include <linux/mtd/nand.h>
29 #include <linux/mtd/nftl.h>
30 #include <linux/mtd/blktrans.h>
32 /* maximum number of loops while examining next block, to have a
33 chance to detect consistency problems (they should never happen
34 because of the checks done in the mounting */
36 #define MAX_LOOPS 10000
39 static void nftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
41 struct NFTLrecord *nftl;
44 if (mtd->type != MTD_NANDFLASH)
46 /* OK, this is moderately ugly. But probably safe. Alternatives? */
47 if (memcmp(mtd->name, "DiskOnChip", 10))
50 if (!mtd->block_isbad) {
52 "NFTL no longer supports the old DiskOnChip drivers loaded via docprobe.\n"
53 "Please use the new diskonchip driver under the NAND subsystem.\n");
57 DEBUG(MTD_DEBUG_LEVEL1, "NFTL: add_mtd for %s\n", mtd->name);
59 nftl = kzalloc(sizeof(struct NFTLrecord), GFP_KERNEL);
62 printk(KERN_WARNING "NFTL: out of memory for data structures\n");
67 nftl->mbd.devnum = -1;
71 if (NFTL_mount(nftl) < 0) {
72 printk(KERN_WARNING "NFTL: could not mount device\n");
77 /* OK, it's a new one. Set up all the data structures. */
79 /* Calculate geometry */
80 nftl->cylinders = 1024;
83 temp = nftl->cylinders * nftl->heads;
84 nftl->sectors = nftl->mbd.size / temp;
85 if (nftl->mbd.size % temp) {
87 temp = nftl->cylinders * nftl->sectors;
88 nftl->heads = nftl->mbd.size / temp;
90 if (nftl->mbd.size % temp) {
92 temp = nftl->heads * nftl->sectors;
93 nftl->cylinders = nftl->mbd.size / temp;
97 if (nftl->mbd.size != nftl->heads * nftl->cylinders * nftl->sectors) {
100 mbd.size == heads * cylinders * sectors
102 printk(KERN_WARNING "NFTL: cannot calculate a geometry to "
103 "match size of 0x%lx.\n", nftl->mbd.size);
104 printk(KERN_WARNING "NFTL: using C:%d H:%d S:%d "
105 "(== 0x%lx sects)\n",
106 nftl->cylinders, nftl->heads , nftl->sectors,
107 (long)nftl->cylinders * (long)nftl->heads *
108 (long)nftl->sectors );
111 if (add_mtd_blktrans_dev(&nftl->mbd)) {
112 kfree(nftl->ReplUnitTable);
113 kfree(nftl->EUNtable);
118 printk(KERN_INFO "NFTL: Found new nftl%c\n", nftl->mbd.devnum + 'a');
122 static void nftl_remove_dev(struct mtd_blktrans_dev *dev)
124 struct NFTLrecord *nftl = (void *)dev;
126 DEBUG(MTD_DEBUG_LEVEL1, "NFTL: remove_dev (i=%d)\n", dev->devnum);
128 del_mtd_blktrans_dev(dev);
129 kfree(nftl->ReplUnitTable);
130 kfree(nftl->EUNtable);
135 * Read oob data from flash
137 int nftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len,
138 size_t *retlen, uint8_t *buf)
140 struct mtd_oob_ops ops;
143 ops.mode = MTD_OOB_PLACE;
144 ops.ooboffs = offs & (mtd->writesize - 1);
149 res = mtd->read_oob(mtd, offs & ~(mtd->writesize - 1), &ops);
150 *retlen = ops.oobretlen;
155 * Write oob data to flash
157 int nftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len,
158 size_t *retlen, uint8_t *buf)
160 struct mtd_oob_ops ops;
163 ops.mode = MTD_OOB_PLACE;
164 ops.ooboffs = offs & (mtd->writesize - 1);
169 res = mtd->write_oob(mtd, offs & ~(mtd->writesize - 1), &ops);
170 *retlen = ops.oobretlen;
174 #ifdef CONFIG_NFTL_RW
177 * Write data and oob to flash
179 static int nftl_write(struct mtd_info *mtd, loff_t offs, size_t len,
180 size_t *retlen, uint8_t *buf, uint8_t *oob)
182 struct mtd_oob_ops ops;
185 ops.mode = MTD_OOB_PLACE;
187 ops.ooblen = mtd->oobsize;
192 res = mtd->write_oob(mtd, offs & ~(mtd->writesize - 1), &ops);
193 *retlen = ops.retlen;
197 /* Actual NFTL access routines */
198 /* NFTL_findfreeblock: Find a free Erase Unit on the NFTL partition. This function is used
199 * when the give Virtual Unit Chain
201 static u16 NFTL_findfreeblock(struct NFTLrecord *nftl, int desperate )
203 /* For a given Virtual Unit Chain: find or create a free block and
204 add it to the chain */
205 /* We're passed the number of the last EUN in the chain, to save us from
206 having to look it up again */
207 u16 pot = nftl->LastFreeEUN;
208 int silly = nftl->nb_blocks;
210 /* Normally, we force a fold to happen before we run out of free blocks completely */
211 if (!desperate && nftl->numfreeEUNs < 2) {
212 DEBUG(MTD_DEBUG_LEVEL1, "NFTL_findfreeblock: there are too few free EUNs\n");
216 /* Scan for a free block */
218 if (nftl->ReplUnitTable[pot] == BLOCK_FREE) {
219 nftl->LastFreeEUN = pot;
224 /* This will probably point to the MediaHdr unit itself,
225 right at the beginning of the partition. But that unit
226 (and the backup unit too) should have the UCI set
227 up so that it's not selected for overwriting */
228 if (++pot > nftl->lastEUN)
229 pot = le16_to_cpu(nftl->MediaHdr.FirstPhysicalEUN);
232 printk("Argh! No free blocks found! LastFreeEUN = %d, "
233 "FirstEUN = %d\n", nftl->LastFreeEUN,
234 le16_to_cpu(nftl->MediaHdr.FirstPhysicalEUN));
237 } while (pot != nftl->LastFreeEUN);
242 static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned pendingblock )
244 struct mtd_info *mtd = nftl->mbd.mtd;
245 u16 BlockMap[MAX_SECTORS_PER_UNIT];
246 unsigned char BlockLastState[MAX_SECTORS_PER_UNIT];
247 unsigned char BlockFreeFound[MAX_SECTORS_PER_UNIT];
248 unsigned int thisEUN;
251 unsigned int targetEUN;
256 memset(BlockMap, 0xff, sizeof(BlockMap));
257 memset(BlockFreeFound, 0, sizeof(BlockFreeFound));
259 thisEUN = nftl->EUNtable[thisVUC];
261 if (thisEUN == BLOCK_NIL) {
262 printk(KERN_WARNING "Trying to fold non-existent "
263 "Virtual Unit Chain %d!\n", thisVUC);
267 /* Scan to find the Erase Unit which holds the actual data for each
268 512-byte block within the Chain.
271 targetEUN = BLOCK_NIL;
272 while (thisEUN <= nftl->lastEUN ) {
273 unsigned int status, foldmark;
276 for (block = 0; block < nftl->EraseSize / 512; block ++) {
277 nftl_read_oob(mtd, (thisEUN * nftl->EraseSize) +
278 (block * 512), 16 , &retlen,
281 foldmark = oob.u.c.FoldMark | oob.u.c.FoldMark1;
282 if (foldmark == FOLD_MARK_IN_PROGRESS) {
283 DEBUG(MTD_DEBUG_LEVEL1,
284 "Write Inhibited on EUN %d\n", thisEUN);
287 /* There's no other reason not to do inplace,
288 except ones that come later. So we don't need
289 to preserve inplace */
293 status = oob.b.Status | oob.b.Status1;
294 BlockLastState[block] = status;
298 BlockFreeFound[block] = 1;
302 if (!BlockFreeFound[block])
303 BlockMap[block] = thisEUN;
306 "SECTOR_USED found after SECTOR_FREE "
307 "in Virtual Unit Chain %d for block %d\n",
311 if (!BlockFreeFound[block])
312 BlockMap[block] = BLOCK_NIL;
315 "SECTOR_DELETED found after SECTOR_FREE "
316 "in Virtual Unit Chain %d for block %d\n",
323 printk("Unknown status for block %d in EUN %d: %x\n",
324 block, thisEUN, status);
329 printk(KERN_WARNING "Infinite loop in Virtual Unit Chain 0x%x\n",
334 thisEUN = nftl->ReplUnitTable[thisEUN];
338 /* We're being asked to be a fold-in-place. Check
339 that all blocks which actually have data associated
340 with them (i.e. BlockMap[block] != BLOCK_NIL) are
341 either already present or SECTOR_FREE in the target
342 block. If not, we're going to have to fold out-of-place
345 for (block = 0; block < nftl->EraseSize / 512 ; block++) {
346 if (BlockLastState[block] != SECTOR_FREE &&
347 BlockMap[block] != BLOCK_NIL &&
348 BlockMap[block] != targetEUN) {
349 DEBUG(MTD_DEBUG_LEVEL1, "Setting inplace to 0. VUC %d, "
350 "block %d was %x lastEUN, "
351 "and is in EUN %d (%s) %d\n",
352 thisVUC, block, BlockLastState[block],
354 BlockMap[block]== targetEUN ? "==" : "!=",
361 if (pendingblock >= (thisVUC * (nftl->EraseSize / 512)) &&
362 pendingblock < ((thisVUC + 1)* (nftl->EraseSize / 512)) &&
363 BlockLastState[pendingblock - (thisVUC * (nftl->EraseSize / 512))] !=
365 DEBUG(MTD_DEBUG_LEVEL1, "Pending write not free in EUN %d. "
366 "Folding out of place.\n", targetEUN);
372 DEBUG(MTD_DEBUG_LEVEL1, "Cannot fold Virtual Unit Chain %d in place. "
373 "Trying out-of-place\n", thisVUC);
374 /* We need to find a targetEUN to fold into. */
375 targetEUN = NFTL_findfreeblock(nftl, 1);
376 if (targetEUN == BLOCK_NIL) {
377 /* Ouch. Now we're screwed. We need to do a
378 fold-in-place of another chain to make room
379 for this one. We need a better way of selecting
380 which chain to fold, because makefreeblock will
381 only ask us to fold the same one again.
384 "NFTL_findfreeblock(desperate) returns 0xffff.\n");
388 /* We put a fold mark in the chain we are folding only if we
389 fold in place to help the mount check code. If we do not fold in
390 place, it is possible to find the valid chain by selecting the
392 oob.u.c.FoldMark = oob.u.c.FoldMark1 = cpu_to_le16(FOLD_MARK_IN_PROGRESS);
393 oob.u.c.unused = 0xffffffff;
394 nftl_write_oob(mtd, (nftl->EraseSize * targetEUN) + 2 * 512 + 8,
395 8, &retlen, (char *)&oob.u);
398 /* OK. We now know the location of every block in the Virtual Unit Chain,
399 and the Erase Unit into which we are supposed to be copying.
402 DEBUG(MTD_DEBUG_LEVEL1,"Folding chain %d into unit %d\n", thisVUC, targetEUN);
403 for (block = 0; block < nftl->EraseSize / 512 ; block++) {
404 unsigned char movebuf[512];
407 /* If it's in the target EUN already, or if it's pending write, do nothing */
408 if (BlockMap[block] == targetEUN ||
409 (pendingblock == (thisVUC * (nftl->EraseSize / 512) + block))) {
413 /* copy only in non free block (free blocks can only
414 happen in case of media errors or deleted blocks) */
415 if (BlockMap[block] == BLOCK_NIL)
418 ret = mtd->read(mtd, (nftl->EraseSize * BlockMap[block]) + (block * 512),
419 512, &retlen, movebuf);
420 if (ret < 0 && ret != -EUCLEAN) {
421 ret = mtd->read(mtd, (nftl->EraseSize * BlockMap[block])
422 + (block * 512), 512, &retlen,
425 printk("Error went away on retry.\n");
427 memset(&oob, 0xff, sizeof(struct nftl_oob));
428 oob.b.Status = oob.b.Status1 = SECTOR_USED;
430 nftl_write(nftl->mbd.mtd, (nftl->EraseSize * targetEUN) +
431 (block * 512), 512, &retlen, movebuf, (char *)&oob);
434 /* add the header so that it is now a valid chain */
435 oob.u.a.VirtUnitNum = oob.u.a.SpareVirtUnitNum = cpu_to_le16(thisVUC);
436 oob.u.a.ReplUnitNum = oob.u.a.SpareReplUnitNum = 0xffff;
438 nftl_write_oob(mtd, (nftl->EraseSize * targetEUN) + 8,
439 8, &retlen, (char *)&oob.u);
441 /* OK. We've moved the whole lot into the new block. Now we have to free the original blocks. */
443 /* At this point, we have two different chains for this Virtual Unit, and no way to tell
444 them apart. If we crash now, we get confused. However, both contain the same data, so we
445 shouldn't actually lose data in this case. It's just that when we load up on a medium which
446 has duplicate chains, we need to free one of the chains because it's not necessary any more.
448 thisEUN = nftl->EUNtable[thisVUC];
449 DEBUG(MTD_DEBUG_LEVEL1,"Want to erase\n");
451 /* For each block in the old chain (except the targetEUN of course),
452 free it and make it available for future use */
453 while (thisEUN <= nftl->lastEUN && thisEUN != targetEUN) {
456 EUNtmp = nftl->ReplUnitTable[thisEUN];
458 if (NFTL_formatblock(nftl, thisEUN) < 0) {
459 /* could not erase : mark block as reserved
461 nftl->ReplUnitTable[thisEUN] = BLOCK_RESERVED;
463 /* correctly erased : mark it as free */
464 nftl->ReplUnitTable[thisEUN] = BLOCK_FREE;
470 /* Make this the new start of chain for thisVUC */
471 nftl->ReplUnitTable[targetEUN] = BLOCK_NIL;
472 nftl->EUNtable[thisVUC] = targetEUN;
477 static u16 NFTL_makefreeblock( struct NFTLrecord *nftl , unsigned pendingblock)
479 /* This is the part that needs some cleverness applied.
480 For now, I'm doing the minimum applicable to actually
481 get the thing to work.
482 Wear-levelling and other clever stuff needs to be implemented
483 and we also need to do some assessment of the results when
484 the system loses power half-way through the routine.
486 u16 LongestChain = 0;
487 u16 ChainLength = 0, thislen;
490 for (chain = 0; chain < le32_to_cpu(nftl->MediaHdr.FormattedSize) / nftl->EraseSize; chain++) {
491 EUN = nftl->EUNtable[chain];
494 while (EUN <= nftl->lastEUN) {
496 //printk("VUC %d reaches len %d with EUN %d\n", chain, thislen, EUN);
497 EUN = nftl->ReplUnitTable[EUN] & 0x7fff;
498 if (thislen > 0xff00) {
499 printk("Endless loop in Virtual Chain %d: Unit %x\n",
502 if (thislen > 0xff10) {
503 /* Actually, don't return failure. Just ignore this chain and
510 if (thislen > ChainLength) {
511 //printk("New longest chain is %d with length %d\n", chain, thislen);
512 ChainLength = thislen;
513 LongestChain = chain;
517 if (ChainLength < 2) {
518 printk(KERN_WARNING "No Virtual Unit Chains available for folding. "
519 "Failing request\n");
523 return NFTL_foldchain (nftl, LongestChain, pendingblock);
526 /* NFTL_findwriteunit: Return the unit number into which we can write
527 for this block. Make it available if it isn't already
529 static inline u16 NFTL_findwriteunit(struct NFTLrecord *nftl, unsigned block)
532 u16 thisVUC = block / (nftl->EraseSize / 512);
533 struct mtd_info *mtd = nftl->mbd.mtd;
534 unsigned int writeEUN;
535 unsigned long blockofs = (block * 512) & (nftl->EraseSize -1);
537 int silly, silly2 = 3;
541 /* Scan the media to find a unit in the VUC which has
542 a free space for the block in question.
545 /* This condition catches the 0x[7f]fff cases, as well as
546 being a sanity check for past-end-of-media access
549 writeEUN = nftl->EUNtable[thisVUC];
551 while (writeEUN <= nftl->lastEUN) {
559 (writeEUN * nftl->EraseSize) + blockofs,
560 8, &retlen, (char *)&bci);
562 DEBUG(MTD_DEBUG_LEVEL2, "Status of block %d in EUN %d is %x\n",
563 block , writeEUN, le16_to_cpu(bci.Status));
565 status = bci.Status | bci.Status1;
575 // Invalid block. Don't use it any more. Must implement.
581 "Infinite loop in Virtual Unit Chain 0x%x\n",
586 /* Skip to next block in chain */
587 writeEUN = nftl->ReplUnitTable[writeEUN];
590 /* OK. We didn't find one in the existing chain, or there
591 is no existing chain. */
593 /* Try to find an already-free block */
594 writeEUN = NFTL_findfreeblock(nftl, 0);
596 if (writeEUN == BLOCK_NIL) {
597 /* That didn't work - there were no free blocks just
598 waiting to be picked up. We're going to have to fold
599 a chain to make room.
602 /* First remember the start of this chain */
603 //u16 startEUN = nftl->EUNtable[thisVUC];
605 //printk("Write to VirtualUnitChain %d, calling makefreeblock()\n", thisVUC);
606 writeEUN = NFTL_makefreeblock(nftl, 0xffff);
608 if (writeEUN == BLOCK_NIL) {
609 /* OK, we accept that the above comment is
610 lying - there may have been free blocks
611 last time we called NFTL_findfreeblock(),
612 but they are reserved for when we're
613 desperate. Well, now we're desperate.
615 DEBUG(MTD_DEBUG_LEVEL1, "Using desperate==1 to find free EUN to accommodate write to VUC %d\n", thisVUC);
616 writeEUN = NFTL_findfreeblock(nftl, 1);
618 if (writeEUN == BLOCK_NIL) {
619 /* Ouch. This should never happen - we should
620 always be able to make some room somehow.
621 If we get here, we've allocated more storage
622 space than actual media, or our makefreeblock
623 routine is missing something.
625 printk(KERN_WARNING "Cannot make free space.\n");
628 //printk("Restarting scan\n");
633 /* We've found a free block. Insert it into the chain. */
635 if (lastEUN != BLOCK_NIL) {
636 thisVUC |= 0x8000; /* It's a replacement block */
638 /* The first block in a new chain */
639 nftl->EUNtable[thisVUC] = writeEUN;
642 /* set up the actual EUN we're writing into */
643 /* Both in our cache... */
644 nftl->ReplUnitTable[writeEUN] = BLOCK_NIL;
646 /* ... and on the flash itself */
647 nftl_read_oob(mtd, writeEUN * nftl->EraseSize + 8, 8,
648 &retlen, (char *)&oob.u);
650 oob.u.a.VirtUnitNum = oob.u.a.SpareVirtUnitNum = cpu_to_le16(thisVUC);
652 nftl_write_oob(mtd, writeEUN * nftl->EraseSize + 8, 8,
653 &retlen, (char *)&oob.u);
655 /* we link the new block to the chain only after the
656 block is ready. It avoids the case where the chain
657 could point to a free block */
658 if (lastEUN != BLOCK_NIL) {
659 /* Both in our cache... */
660 nftl->ReplUnitTable[lastEUN] = writeEUN;
661 /* ... and on the flash itself */
662 nftl_read_oob(mtd, (lastEUN * nftl->EraseSize) + 8,
663 8, &retlen, (char *)&oob.u);
665 oob.u.a.ReplUnitNum = oob.u.a.SpareReplUnitNum
666 = cpu_to_le16(writeEUN);
668 nftl_write_oob(mtd, (lastEUN * nftl->EraseSize) + 8,
669 8, &retlen, (char *)&oob.u);
676 printk(KERN_WARNING "Error folding to make room for Virtual Unit Chain 0x%x\n",
681 static int nftl_writeblock(struct mtd_blktrans_dev *mbd, unsigned long block,
684 struct NFTLrecord *nftl = (void *)mbd;
686 unsigned long blockofs = (block * 512) & (nftl->EraseSize - 1);
690 writeEUN = NFTL_findwriteunit(nftl, block);
692 if (writeEUN == BLOCK_NIL) {
694 "NFTL_writeblock(): Cannot find block to write to\n");
695 /* If we _still_ haven't got a block to use, we're screwed */
699 memset(&oob, 0xff, sizeof(struct nftl_oob));
700 oob.b.Status = oob.b.Status1 = SECTOR_USED;
702 nftl_write(nftl->mbd.mtd, (writeEUN * nftl->EraseSize) + blockofs,
703 512, &retlen, (char *)buffer, (char *)&oob);
706 #endif /* CONFIG_NFTL_RW */
708 static int nftl_readblock(struct mtd_blktrans_dev *mbd, unsigned long block,
711 struct NFTLrecord *nftl = (void *)mbd;
712 struct mtd_info *mtd = nftl->mbd.mtd;
714 u16 thisEUN = nftl->EUNtable[block / (nftl->EraseSize / 512)];
715 unsigned long blockofs = (block * 512) & (nftl->EraseSize - 1);
717 int silly = MAX_LOOPS;
721 lastgoodEUN = BLOCK_NIL;
723 if (thisEUN != BLOCK_NIL) {
724 while (thisEUN < nftl->nb_blocks) {
725 if (nftl_read_oob(mtd, (thisEUN * nftl->EraseSize) +
726 blockofs, 8, &retlen,
728 status = SECTOR_IGNORE;
730 status = bci.Status | bci.Status1;
734 /* no modification of a sector should follow a free sector */
737 lastgoodEUN = BLOCK_NIL;
740 lastgoodEUN = thisEUN;
745 printk("Unknown status for block %ld in EUN %d: %x\n",
746 block, thisEUN, status);
751 printk(KERN_WARNING "Infinite loop in Virtual Unit Chain 0x%lx\n",
752 block / (nftl->EraseSize / 512));
755 thisEUN = nftl->ReplUnitTable[thisEUN];
760 if (lastgoodEUN == BLOCK_NIL) {
761 /* the requested block is not on the media, return all 0x00 */
762 memset(buffer, 0, 512);
764 loff_t ptr = (lastgoodEUN * nftl->EraseSize) + blockofs;
766 int res = mtd->read(mtd, ptr, 512, &retlen, buffer);
768 if (res < 0 && res != -EUCLEAN)
774 static int nftl_getgeo(struct mtd_blktrans_dev *dev, struct hd_geometry *geo)
776 struct NFTLrecord *nftl = (void *)dev;
778 geo->heads = nftl->heads;
779 geo->sectors = nftl->sectors;
780 geo->cylinders = nftl->cylinders;
785 /****************************************************************************
789 ****************************************************************************/
792 static struct mtd_blktrans_ops nftl_tr = {
795 .part_bits = NFTL_PARTN_BITS,
797 .getgeo = nftl_getgeo,
798 .readsect = nftl_readblock,
799 #ifdef CONFIG_NFTL_RW
800 .writesect = nftl_writeblock,
802 .add_mtd = nftl_add_mtd,
803 .remove_dev = nftl_remove_dev,
804 .owner = THIS_MODULE,
807 extern char nftlmountrev[];
809 static int __init init_nftl(void)
811 printk(KERN_INFO "NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c %s\n", nftlmountrev);
813 return register_mtd_blktrans(&nftl_tr);
816 static void __exit cleanup_nftl(void)
818 deregister_mtd_blktrans(&nftl_tr);
821 module_init(init_nftl);
822 module_exit(cleanup_nftl);
824 MODULE_LICENSE("GPL");
825 MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>, Fabrice Bellard <fabrice.bellard@netgem.com> et al.");
826 MODULE_DESCRIPTION("Support code for NAND Flash Translation Layer, used on M-Systems DiskOnChip 2000 and Millennium");