problem with strataflash after suspend and resume

Todd Poynor tpoynor at mvista.com
Thu Aug 25 15:14:32 EDT 2005


Nicolas Pitre wrote:
> On Thu, 25 Aug 2005, Ian Campbell wrote:
>>I have a PXA255 (Xscale/ARM) platform with a strataflash part on it
>>(28F128J3). With 2.6.11.11 (the only previous version I have convenient
>>access to) I can suspend and resume repeatedly just fine, however with
>>2.6.13-rc7 I occasionally get something like this just after resume:
>>
>>        Waiting for chip to be ready timed out. Status 0
...
>>The flash would appear to be readable, since resuming involves running
>>the very early parts of the bootloader, which is stored in flash.
> 
> 
> And that's the problem.  The flash is in data mode while the driver 
> probably still thinks it is in status mode.
> 
> Make sure that cfi_intelext_suspend() gets called prior going to sleep 
> and that cfi_intelext_resume() is called upon getting back from sleep 
> mode.  If those calls don't take place you'll have inconsistent driver 
> state, or worse inconsistent flash content.

Since the bootloader is running I'll guess the PXA255 suspend mode 
chosen powers the system (and flash chips) down and up during 
suspend/resume (as do some PXA27x modes), so the mtd chip driver state 
machine is out of sync with the hardware state.  Those routines will 
force the hardware and software back to consistent state.  Getting those 
routines called involves adding LDM support and suspend/resume callbacks 
a la drivers/mtd/maps/sa1100-flash.c, and registering a platform_device 
in the board files.


-- 
Todd




More information about the linux-mtd mailing list