Subject: Re: [PATCH] powerpc: Create "rom" (MTD) device prpmc2800

From: David Gibson <[email-masked]>
Date: Thu, 14 Jun 2007 14:29:07 +1000

On Wed, Jun 13, 2007 at 11:37:42AM +0200, Segher Boessenkool wrote:
> >> How do non-device-tree MTD users handle this?
> >
> > Invidual, board-specific map files with hardcoded partition tables.
> 
> That's what I was afraid of.  Sigh.
> 
> > See drivers/mtd/maps/ebony.c for example.
> 
> [/me looks...]  Oh horror.
> 
> > Hence my view of the device
> > tree as a preferable option.
> 
> I think some binary partition table format that can be
> used by _all_ MTD consumers should be defined.  How
> that table should be communicated to the kernel in the
> device tree case we can discuss later, then.  Maybe
> something as simple as storing it in flash, and have a
> "partition-table-offset" property or something like that.
> 
> This is something the MTD people will have to buy into
> of course.

I tought I saw some config option implying that there already existed
an on-device partition table format for flashes.  Doesn't help us for
existing boards which don't expect such a setup, of course.

Incidentally, with either the partitions-described-by-properties, or
the revised more-flexible partitions-described-by-subnodes format, I'm
not seeing it as required that the whole of the flash address space be
described.  So it would certainly be possible to *only* describe the
sections of the flash used by firmware.  But I'm suggesting that we
optionally allow other partitions to be described for boards / systems
which have strong conventions about how the flash is divided and where
we don't have any other way of recording the partition layout short of
hardcoding.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson