public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Todd Poynor <tpoynor@mvista.com>
To: "Timofei V. Bondarenko" <timm@ipi.ac.ru>
Cc: tglx@linutronix.de, linux-mtd@lists.infradead.org
Subject: Re: nand locking
Date: Wed, 27 Apr 2005 11:27:09 -0700	[thread overview]
Message-ID: <426FD97D.9000105@mvista.com> (raw)
In-Reply-To: <426F56C1.6020204@ipi.ac.ru>

Timofei V. Bondarenko wrote:

> It would be nice to unlock the rw partitions only.
> But it's weird a bit:
> the mtd_partition may be incomplete before add_mtd_partitions() done.
> After add_mtd_partitions() my startap code has no handle to actual 
> partition info.
> The mtd_partition.mtdp seems only choice, though it prevents partitions 
> from registering...
> So, could couple of lines in add_mtd_partitions() do that work?

If I understand correctly, it may be the same issue I ran into on Intel 
NOR flash: the chip driver (which may have the knowledge of whether the 
particular chips are locked or lockable) gets to see the "whole device" 
struct mtd_info at probe time, but doesn't see the "partition" structs 
registered later via add_mtd_partitions(), which have the per-partition 
r/w flags.

I tried adding a callback to the chip driver at each device/partition 
add (see first patch attempt in recent "Fixup Intel flash that powers up 
locked" thread).  But I believe that was part of what was (justifiably) 
deemed messy about the patch.

So far the general verdict on these flashes that power up locked seems 
to be either leave all blocks locked or unlock all blocks (either in the 
bootloader or at flash probe time), and let custom code in userspace 
lock/unlock what is needed.  I do like the idea of the kernel rectifying 
lock status with the map flags myself, though...

-- 
Todd

  parent reply	other threads:[~2005-04-27 18:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-27  7:34 nand locking Timofei V. Bondarenko
2005-04-27  9:00 ` Thomas Gleixner
2005-04-27  9:09   ` Timofei V. Bondarenko
2005-04-27 10:45     ` Thomas Gleixner
2005-04-27 10:27       ` Timofei V. Bondarenko
2005-04-27 10:32         ` Artem B. Bityuckiy
2005-04-27 11:35         ` Thomas Gleixner
2005-04-27 11:19           ` Timofei V. Bondarenko
2005-04-27 18:27     ` Todd Poynor [this message]
2005-04-28  7:00       ` Timofei V. Bondarenko
2005-04-29 22:19         ` Todd Poynor

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=426FD97D.9000105@mvista.com \
    --to=tpoynor@mvista.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tglx@linutronix.de \
    --cc=timm@ipi.ac.ru \
    /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