Hi all,<br><br>I am running the omap2 nand driver on kernel 2.6.39 and i am having a problem formatting JFFS2 filesystem.  Normal flash erase by issuing "flash_erase /dev/mtd4 0 0" would work fine.  However, nand erase with JFFS2 formatting by issuing "flash_erase -j /dev/mtd4 0 0"  would fail with IO errors.  Below is the description of the error generated from mtd-utils-1.4.9 or mtd-utils-1.5.0.<br>
<br>localhost# flash_erase -j /dev/mtd4 0 0<br><br>Erasing 128 Kibyte @ 1f920000 -- 99 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 4041 (mtd4)<br>        error 5 (Input/output error)<br>flash_erase: error!: /dev/mtd4: MTD Erase failure<br>
             error 5 (Input/output error)<br>Erasing 128 Kibyte @ 1f940000 -- 99 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 4042 (mtd4)<br>        error 5 (Input/output error)<br>flash_erase: error!: /dev/mtd4: MTD Erase failure<br>
             error 5 (Input/output error)<br>etc......<br><br>Attached is a bug fix to properly use Jiffies tick timer.  Previous code was buggy b/c it did not account for scheduler tick (HZ) to be less than 50HZ.  When kernel config HZ tick is set below 50HZ, the omap driver does not wait at all after executing a status request command, because:<br>
<br>timeo += (HZ * 20) / 1000;<br><br>evaluates to zero.  Again, this bug should only surface when HZ is set below 50Hz.<br><br><br>thank you,<br><br>Toan<br><br>