Subject: Re: MTD devices in NetBSD
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Allen Briggs <briggs@netbsd.org>
List: tech-kern
Date: 03/22/2006 12:25:30
[ core@ removed ]

On Wed, Mar 22, 2006 at 08:28:30AM -0800, Garrett D'Amore wrote:
> > You can also find systems where the devices are set up in parallel,
> > so two 8-bit devices live on a 16-bit bus (or 4 8-bit devices on
> > a 32-bit bus or 2 16-bit devices on a 32-bit bus, etc.) where one
> > device uses bit 0-7 and the other uses 8-15.  Something to keep in
> > mind, perhaps.
> 
> Hmm... never run into that before.  For read it wouldn't matter, but it
> could have significant complications for write, because you've got to
> command each flash part separately.

It's not too bad--you usually just issue the commands in parallel, so if
you have two 16-bit devices on a 32-bit bus, you set the command in the
lower 16 bits and copy to the upper 16 bits before the write.  Or
something like that.  This does seem to be rare these days.  4-5 years
ago, I worked on a board that used 4 8-bit devices on a 32-bit bus.  I
think it's mainly those wacky hardware guys trying to save money...

> > How would you handle flash partitioning?  For example, devices using
> > RedBoot have a "standard" partitioning scheme where you can put files
> > using the boot ROM (through the 'fis' commands -- 'fis init', 'fis
> > create', etc.).  Other ROMs probabaly have similar abilities.  But
> > in any case, I'd probably want to have a way to define in a kernel
> > configuration file that the area containing the ROM is read-only.
> > Or at least separate from the region that I want to scribble on.
> 
> That's a good idea, though I'd probably use properties for it.  Then
> device_register() can define whatever properties are appropriate for the
> platform.

I'm not sure I quite grok what you mean here.  I was thinking that
it would be nice if the system, in a default scenario, could recognize
the loader's partitioning scheme (if any) and have the different parts
show up as different wedges/partitions in BSD as well as, perhaps,
maintaining read-only bits.

Oh...  That reminds me.  Were you thinking about honoring / exposing
or punting on sector protection?

> > Could we please avoid the term bikeshed?  Especially as a verb?
> Got a proposal for a different word? :-)

"get into discussions about irrelevant bits" ?

> As of last night, I couldn't find any thing.  :-)

Pity.  :-)

-allen

-- 
                  Use NetBSD!  http://www.NetBSD.org/