From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 5 Jun 2007 14:11:14 -0700 From: "Mark A. Greer" To: Sergei Shtylyov Subject: Re: [PATCH] powerpc: Create "rom" (MTD) device prpmc2800 Message-ID: <20070605211114.GA17131@mag.az.mvista.com> References: <20070601232022.GA21237@mag.az.mvista.com> <20070604205646.GD10612@mag.az.mvista.com> <4665C8F4.2090502@ru.mvista.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <4665C8F4.2090502@ru.mvista.com> Cc: linuxppc-dev List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, Jun 06, 2007 at 12:35:00AM +0400, Sergei Shtylyov wrote: > Mark A. Greer wrote: > > > > flash@a0000000 { > > device_type = "rom"; > > compatible = "direct-mapped"; > > reg = ; /* 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?