Erase suspend operation for S29GL256N

MarkUrs mark.urs at gmail.com
Wed May 2 08:46:32 EDT 2007


Hi,

I'm working on S29GL256N on a MIPS 4Kec board on Linux 2.6.10, with
JFFS2 on the flash as root FS.
The flash is not working with the normal driver, but we have to do the
dq7 data checking for it work. With that  we are getting CRC error on
the FS
mount (first pass only) and on debugging the cause of the issue seems
to be the chip_ready() functionality in the get_chip function in
FL_ERASE state and for FL_READY mode.


2_6_10-tip/drivers/mtd/chips/cfi_cmdset_0002.c
<SNIPPED>

      case FL_ERASING:
              if (mode == FL_WRITING) /* FIXME: Erase-suspend-program
appears broken. */
                      goto sleep;

              if (!(mode == FL_READY || mode == FL_POINT
                    || !cfip
                    || (mode == FL_WRITING && (cfip->EraseSuspend & 0x2))
                    || (mode == FL_WRITING && (cfip->EraseSuspend & 0x1))))
                      goto sleep;

              /* We could check to see if we're trying to access the sector
               * that is currently being erased. However, no user will try
               * anything like that so we just wait for the timeout. */

              /* Erase suspend */
              /* It's harmless to issue the Erase-Suspend and Erase-Resume
               * commands when the erase algorithm isn't in progress. */
              map_write(map, CMD(0xB0), chip->in_progress_block_addr);
              chip->oldstate = FL_ERASING;
              chip->state = FL_ERASE_SUSPENDING;
              chip->erase_suspended = 1;
              for (;;) {
                      if (chip_ready(map, adr))
                              break;
<SNIPPED>


It seems the issue is with the erase suspend mode checking is buggy
and will cause wrong data to read. So we are looking for a erase
suspend mode check with the Dq7, 5,2 data polling. Request if anybody
has tried this to share their experience.




-- 


Thanks and regards,
Mark




More information about the linux-mtd mailing list