public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Todd Poynor <tpoynor@mvista.com>
To: Nicolas Pitre <nico@cam.org>
Cc: Ian Campbell <icampbell@arcom.com>, linux-mtd@lists.infradead.org
Subject: Re: problem with strataflash after suspend and resume
Date: Thu, 25 Aug 2005 12:14:32 -0700	[thread overview]
Message-ID: <430E1898.4000806@mvista.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0508251039400.15345@localhost.localdomain>

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

      reply	other threads:[~2005-08-25 19:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-25 14:08 problem with strataflash after suspend and resume Ian Campbell
2005-08-25 14:58 ` Nicolas Pitre
2005-08-25 19:14   ` Todd Poynor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=430E1898.4000806@mvista.com \
    --to=tpoynor@mvista.com \
    --cc=icampbell@arcom.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nico@cam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox