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

Sergei Shtylyov sshtylyov at ru.mvista.com
Wed Jun 6 08:41:45 EDT 2007


Hello.

Mark A. Greer wrote:

>>Mark A. Greer wrote:

>>>		flash at 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




More information about the linux-mtd mailing list