From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sascha Hauer Subject: Re: [RFC] [PATCH] Device Tree on ARM platform Date: Thu, 28 May 2009 14:43:07 +0200 Message-ID: <20090528124307.GN22742@pengutronix.de> References: <20090527150527.GK6805@pengutronix.de> <87vdnm8sec.fsf@macbook.be.48ers.dk> <4A1D6901.2090508@freescale.com> <20090527175609.GB31861@flint.arm.linux.org.uk> <4A1D8FBA.6040802@freescale.com> <20090527192909.GA32398@flint.arm.linux.org.uk> <20090527205218.GA5591@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: 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: Russell King , devicetree-discuss , Mark Brown , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org, Scott Wood , Janboe Ye , Timur Tabi List-Id: devicetree@vger.kernel.org On Wed, May 27, 2009 at 03:05:58PM -0600, Grant Likely wrote: > On Wed, May 27, 2009 at 2:52 PM, Mark Brown > wrote: > > On Wed, May 27, 2009 at 08:29:10PM +0100, Russell King wrote: > >> On Wed, May 27, 2009 at 02:08:42PM -0500, Scott Wood wrote: > > > >> > I'm not talking about platform specific code, I'm talking about code= to > >> > retrieve information about a device from the device tree. =A0There w= ould > >> > not be separate instances of this for "platforms X, Y and Z", just o= ne > >> > of_platform binding in each driver. =A0It's no different than having= a > >> > platform bus binding, except in the data structures used. > > > >> I really don't see what OF buys us then, apart from additional depende= ncies > >> that have to be correct for the kernel to work. =A0I can only see disa= dvantages > >> if all OF is, is a way to pass some file to the kernel to (effectively= ) tell > >> it which drivers to use. > > > > The main selling points of the device tree AFAICT are that some > > platforms have to use it it anyway due to the native OS and firmware for > > the platform use it, the possibility of using the same device tree with > > more than one OS (modulo unrepresentable holes) and the fact that some > > people find it more convenient to use than straight data tables > > (personally I find the two approaches to be much of a muchness there). > > Perhaps I'm missing something, though? > = > Here are some that I've find useful: > = > There is the advantage that it decouples the machine description from > the kernel code, which in turn seems to encourage code reuse. There > has been a significant decrease in the amount of platform specific > code in powerpc since the switch to FDT booting. > = > There is the advantage of easy multiplatform support. I regularly > build a single kernel image which boots on all my MPC5200 boards, and > on my MPC83xx boards. That is not necessarily an advantage of a device tree. On ARM you can also build a kernel which runs on 20+ PXA platforms at the same time. (And I'm sure it can be done to even support say i.MX and PXA at the same time, but this is another story) Sascha -- = Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |