From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.178]) by ozlabs.org (Postfix) with ESMTP id 94193DE0C2 for ; Tue, 30 Oct 2007 02:40:25 +1100 (EST) Received: by wa-out-1112.google.com with SMTP id m28so2316519wag for ; Mon, 29 Oct 2007 08:40:23 -0700 (PDT) Message-ID: Date: Mon, 29 Oct 2007 09:40:23 -0600 From: "Grant Likely" Sender: glikely@secretlab.ca To: "Marian Balakowicz" Subject: Re: [PATCH 05/11] [POWERPC] TQM5200 DTS In-Reply-To: <4725EB9E.1030507@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 References: <20071023231302.29359.27417.stgit@hekate.izotz.org> <20071023231333.29359.35252.stgit@hekate.izotz.org> <13403420.post@talk.nabble.com> <4720BA4B.5090707@semihalf.com> <20071026013343.GD457@localhost.localdomain> <4725EB9E.1030507@semihalf.com> Cc: linuxppc-dev@ozlabs.org, Martin Krause , David Gibson List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 10/29/07, Marian Balakowicz wrote: > David Gibson wrote: > > On Thu, Oct 25, 2007 at 05:46:19PM +0200, Marian Balakowicz wrote: > >> Grant Likely wrote: > >>> On 10/25/07, Martin Krause wrote: > > [snip] > >>>> On a board with 16 MiB FLASH for example the "big-fs" _and_ the "misc" > >>>> partition could not be used. "big-fs", because the memory is too small > >>>> (which is OK) and "misc", because it overlaps 1 MiB over the physikal > >>>> flash border. So only the first 9 MiB of the flash could be used in Linux. > >>>> The remaining 7 MiB couldn't be accessed. > >>> Perhaps it would be better to drop the flash layout from the in-kernel > >>> dts files entirely since flash layout can be a fluid thing. > >> Well, but that would not be really user friendly, I'd rather stick > >> with some default config. > > > > Strictly speaking the device-tree is not the right place for flash > > partitioning information. We put it there because it's preferable to > > having hardcoded per-board flash layouts in the code itself. > > > > It only really works well, though, when there are strong conventions > > (shared with the firmware) about how to partition the flash. > > > > Where it's really up to the user to determine how they want to lay out > > their flash, putting things in the device tree isn't a really good > > idea. > > In principle, you are right, we should not be putting a user dependent > configuration into .dts files. But on the other hand, bindings have > been defined for flash-like devices and their partition layouts and > physmap_of device driver is expecting to get this information from the > blob. So, it is the place for it. But if we are not to put partition > layouts into the default kernel .dts files then we should > provide/maintain some examples an that may be a even bigger mess. > > > Incidentally, it's not required that *all* the flash address space be > > in partitions, so it is possible only give partitions for those flash > > chunks which the firmware needs to know about. > > That might be nicer solution but different variants of TQM5200 boards > do not share the same subset of partitions (default u-boot partitions > at least), so it will not help much. It's probably more appropriate to have the flash partition layout in the u-boot environment and have u-boot populate the partition information in the device tree. g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. grant.likely@secretlab.ca (403) 399-0195