Erase suspend operation for S29GL256N

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


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.


      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))

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,

More information about the linux-mtd mailing list