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

From: Sergei Shtylyov <[email-masked]>
Date: Wed, 06 Jun 2007 16:41:45 +0400

Hello.

Mark A. Greer wrote:

>>Mark A. Greer wrote:

>>>		flash@a0000000 {
>>>			device_type = "rom";
>>>			compatible = "direct-mapped";
>>>			reg = <a0000000 4000000>; /* Default (64MB) */
>>>			probe-type = "CFI";
>>>			bank-width = <4>;
>>>			partitions = <00000000 00100000 /* RO */
>>>				      00100000 00040001 /* RW */
>>>				      00140000 00400000 /* RO */
>>>				      00540000 039c0000 /* RO */
>>>				      03f00000 00100000>; /* RO */

>>   Hm, this should have been the other way around -- ones with odd size are 
>>RO, ones with even size are RW.

> Yeah, that's what the comment says but the code says the opposite:

> 	if (*part++ & 1) /* bit 0 set signifies read only partition */
> 		(*parts)[i].mask_flags = MTD_WRITEABLE;

> Doesn't that make it RW if bit 0 is set?

    Contrarywise, though this may surprise you. ;-)
    This is a question to MTD people...

WBR, Sergei