<div dir="ltr">Hi,<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">> > I really would rather not duplicate all of this, which looks extremely<br>
> > similar to regular NAND. Is there reason why we don't use the mtd_info<br>
> > function pointer interface?<br>
><br>
> Agreed, It's almost same as NAND code.<br>
> Now nand code uses two modes, legacy and mtd. Because I don't want to<br>
> break the NAND code , I used the duplicated code.<br>
> Basically it should be used the common mtd style code except legacy.<br>
><br>
> So first it added the current code, next time it tries to use the<br>
> common interface and some code clean up.<br>
</div></blockquote></div><br>As it is right now, you can't have jffs2 command support on both NAND and OneNAND.<br>Dunno if you could have this case (both NAND and OneNAND enabled) but it will fail to build:<br>In file included from /u-boot-1.3.3/include/linux/mtd/onenand.h:21, <br>
from jffs2_1pass.c:279: <br>/u-boot-1.3.3/include/linux/mtd/bbm.h:49: error: redefinition of 'struct nand_bbt_descr' <br>
In file included from jffs2_1pass.c:279: <br>/u-boot-1.3.3/include/linux/mtd/onenand.h:36: error: redeclaration of enumerator 'FL_READY' <br>
/u-boot-1.3.3/include/linux/mtd/nand.h:212: error: previous definition of 'FL_READY' was here <br>/u-boot-1.3.3/include/linux/mtd/onenand.h:37: error: redeclaration of enumerator 'FL_READING' <br>
/u-boot-1.3.3/include/linux/mtd/nand.h:213: error: previous definition of 'FL_READING' was here <br>/u-boot-1.3.3/include/linux/mtd/onenand.h:38: error: redeclaration of enumerator 'FL_WRITING' <br>
/u-boot-1.3.3/include/linux/mtd/nand.h:214: error: previous definition of 'FL_WRITING' was here <br>/u-boot-1.3.3/include/linux/mtd/onenand.h:39: error: redeclaration of enumerator 'FL_ERASING' <br>
/u-boot-1.3.3/include/linux/mtd/nand.h:215: error: previous definition of 'FL_ERASING' was here <br>/u-boot-1.3.3/include/linux/mtd/onenand.h:40: error: redeclaration of enumerator 'FL_SYNCING' <br>
/u-boot-1.3.3/include/linux/mtd/nand.h:216: error: previous definition of 'FL_SYNCING' was here <br>jffs2_1pass.c: In function 'put_fl_mem': <br>
jffs2_1pass.c:466: error: redefinition of 'id' <br>jffs2_1pass.c:459: error: previous definition of 'id' was here <br>
make[1]: *** [jffs2_1pass.o] Error 1<br><br><br>cheers,<br><br>Fathi<br></div>