From: Todd Poynor <tpoynor@mvista.com>
To: Nicolas Pitre <nico@cam.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Fixup Intel flash that powers up locked
Date: Thu, 21 Apr 2005 20:04:55 -0700 [thread overview]
Message-ID: <426869D7.3050202@mvista.com> (raw)
In-Reply-To: <Pine.LNX.4.62.0504122118560.14514@localhost.localdomain>
Nicolas Pitre wrote:
> Properly dealing with this "feature" appears to be so messy that I'm
> starting to wonder if we should not just unconditionally unlock the
> flash at boot time and be done with it.
Or leave all blocks locked to err on the side of safety and require
userspace init scripts to unlock writeable partitions.
> It's only the flash used for the root filesystem which is problematic
> anyway, right? If so then I think there should be a mount option for
> JFFS* such that it directly unlocks the whole of the MTD device it's
> about to be mounted on when it's mounted read-write. That's it.
Read-only root with writeable partitions mounted afterwards is what I
suggest, I imagine there's reasons not to do it that way, though.
> As for the suspend case then you should probably just preserve the flash
> lock state before suspending and restore that state upon resume.
I'm guessing the code for that would trigger the messy alarms as well...
Am finding the frob DEBUG_LOCK_BITS logic doesn't read lock status
properly on this board's chip (blocks that appear to be writeable still
read status non-zero). This makes it difficult to setup the bitmap at
suspend time. Now, I could maintain the bitmap at each block
lock/unlock time, but the frob code doesn't pass the eraseregion info
(useful to understand region size and maintain per-region bitmap) to the
chip driver (which knows whether the chip has this powers-up-locked
property). Alas. I will play with this some more.
> Why are you doing this block by block? You could as well just do:
>
> cfi_intelext_unlock(mtd, 0, mtd->size);
>
> since the block walking is already performed by cfi_varsize_frob().
Aargh, that code predated the frob on multi-partition flash fix, sorry.
Thanks,
--
Todd
next prev parent reply other threads:[~2005-04-22 3:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-13 1:03 Fixup Intel flash that powers up locked Todd Poynor
2005-04-13 1:45 ` Nicolas Pitre
2005-04-17 4:41 ` Christopher Hoover
2005-04-22 3:04 ` Todd Poynor [this message]
2005-04-22 23:22 ` Todd Poynor
[not found] <E1DLiOu-0006Ah-1b@canuck.infradead.org>
2005-04-26 20:54 ` rick adams
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=426869D7.3050202@mvista.com \
--to=tpoynor@mvista.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