mtd unlock issue

iqbal iqbal at ti.com
Wed Jan 23 00:57:41 EST 2008


Hello list,

My flash driver unlocks the device inside the probe function for further
writes/programing, due to this my Watchdog reset is causing the kernel to
panic.

The following patch fixed my problem, but I think the fix is some where in the
cfi driver. This patch reads the first sector and make
the flash into read mode.

     /* Unlock the flash device. */
        if (info->mtd->unlock)
                info->mtd->unlock(info->mtd, 0, info->mtd->size);
+       /* HACK by a forcing a dummy read To reset the partition to readable
+        * TODO: a real fix is by fixing unlock function
+        */
+       if (info->mtd->read) {
+               u_char val;
+               size_t len = sizeof(val);
+               info->mtd->read(info->mtd, 0,len,&len, &val);
+       }


If you are aware of this fix pleae let me know how to proceed further and have
a right fix.
I work on the TI OMAP platforms.

Thanks,

Regards
Iqbal







More information about the linux-mtd mailing list