From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Stefan Roese To: Grant Likely Subject: Re: physmap_of and partitions (mtd concat support) Date: Wed, 25 Mar 2009 10:35:27 +0100 References: <200903231151.10373.sr@denx.de> <200903241639.56637.sr@denx.de> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Message-Id: <200903251035.28074.sr@denx.de> Cc: linuxppc-dev@ozlabs.org, devicetree-discuss list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tuesday 24 March 2009, Grant Likely wrote: > > OK, in the example above such a spanning partition is not so likely. But > > think about my original example, the Intel P30 with two different cfi > > compatible chips on one die. Here a partition spanning over both devices > > is very likely. > > I agree. Same thing when two or more flash chips are put on a board > in consecutive addresses. I've worked on plenty of these arrangements > myself. Yes, multiple identical devices are no problem at all. This is handled correctly with the current code and device tree syntax. > This case really does sound like a driver bug and that the existing > cfi-flash binding is sufficient to describe the hardware. IIUC, when > all the flash chips are of the same type the physmap_of driver should > be smart enough to detect each of the flash chips within the reg > range. *When* all are identical then this works, yes. But in the Intel P30 case the 2 chips are not identical. And from my understanding this is not a problem/bug in the physmap_of driver. > If I'm wrong and it cannot do this, then it would be a simple matter > of adding an additional tuple to reg for each discrete chip. A > simple, backwards compatible extension which doesn't require a new > binding. So you are thinking of something like this? flash@f0000000,0 { #address-cells = <1>; #size-cells = <1>; compatible = "cfi-flash"; reg = <0 0x00000000 0x02000000 0 0x02000000 0x02000000>; bank-width = <2>; device-width = <2>; partition@0 { label = "test-part1"; reg = <0 0x04000000>; }; }; That's also fine with me. Changes to physmap_of would be minimal this way. Do we have a consensus that this should be the way to implement concat support in physmap_of? Thanks. Best regards, Stefan From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Subject: Re: physmap_of and partitions (mtd concat support) Date: Wed, 25 Mar 2009 10:35:27 +0100 Message-ID: <200903251035.28074.sr@denx.de> References: <200903231151.10373.sr@denx.de> <200903241639.56637.sr@denx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org To: Grant Likely Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org, devicetree-discuss list List-Id: devicetree@vger.kernel.org On Tuesday 24 March 2009, Grant Likely wrote: > > OK, in the example above such a spanning partition is not so likely. But > > think about my original example, the Intel P30 with two different cfi > > compatible chips on one die. Here a partition spanning over both devices > > is very likely. > > I agree. Same thing when two or more flash chips are put on a board > in consecutive addresses. I've worked on plenty of these arrangements > myself. Yes, multiple identical devices are no problem at all. This is handled correctly with the current code and device tree syntax. > This case really does sound like a driver bug and that the existing > cfi-flash binding is sufficient to describe the hardware. IIUC, when > all the flash chips are of the same type the physmap_of driver should > be smart enough to detect each of the flash chips within the reg > range. *When* all are identical then this works, yes. But in the Intel P30 case the 2 chips are not identical. And from my understanding this is not a problem/bug in the physmap_of driver. > If I'm wrong and it cannot do this, then it would be a simple matter > of adding an additional tuple to reg for each discrete chip. A > simple, backwards compatible extension which doesn't require a new > binding. So you are thinking of something like this? flash@f0000000,0 { #address-cells = <1>; #size-cells = <1>; compatible = "cfi-flash"; reg = <0 0x00000000 0x02000000 0 0x02000000 0x02000000>; bank-width = <2>; device-width = <2>; partition@0 { label = "test-part1"; reg = <0 0x04000000>; }; }; That's also fine with me. Changes to physmap_of would be minimal this way. Do we have a consensus that this should be the way to implement concat support in physmap_of? Thanks. Best regards, Stefan