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

Segher Boessenkool segher at kernel.crashing.org
Thu Jun 7 12:46:45 EDT 2007


>> So I think the best thing to have would be
>>
>> 	compatible      "cfi-flash"
>> 	bank-width      like you said
>> 	device-width    width of a single flash device
>> 	reg             complete address range of this thing
>>
>> and then the Linux OF CFI flash code / MTD code just keeps
>> on probing devices from that address range until it has it
>> filled.
>>
>> Sounds good / comments / anything I missed?
>
> That seems reasonable. I would personally have used 'interleave' to 
> give
> the number of devices interleaved together into the specified
> bank-width, rather than specifying device-width.

I think "device-width" is much clearer -- from the name
"interleave" you cannot tell that it actually means
"number-of-interleaved-devices-in-this-bank".

> People might get
> confused by device-width because many devices can actually be _either_
> x16 or x8.

Well after it has been soldered down to the board, it's
pretty much fixed what the device's bus width is ;-)

> But I don't care much. Linux will only be using the
> bank-width anyway.

So it can reliably detect interleaving itself?

I'd like "device-width" to be a required property still,
for the benefit of non-Linux device tree users, or just
in case.

> The other thing that might be seen in the 'compatible' property would 
> be
> 'jedec-flash',

I don't want to deal with that yet, one thing at a time,
and CFI flash it is now.  JEDEC is a bit hairier.

> and in that case perhaps we also want properties for the
> manufacturer and device ident?

Certainly, since they cannot be reliably probed.

> Linux wouldn't necessarily care about
> them, but other operating systems might.
>
> And we also need partition information to get through somehow, in the
> cases where the firmware knows it.

A child node per partition I suppose, dunno.


Segher





More information about the linux-mtd mailing list