From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3FC9CDDF3D for ; Fri, 8 Aug 2008 08:38:30 +1000 (EST) Subject: Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function From: Benjamin Herrenschmidt To: Grant Likely In-Reply-To: References: <20080806055214.30717.86092.stgit@trillian.secretlab.ca> <20080806060239.30717.79273.stgit@trillian.secretlab.ca> <20080805.233205.201125898.davem@davemloft.net> Content-Type: text/plain Date: Fri, 08 Aug 2008 08:37:58 +1000 Message-Id: <1218148678.24157.317.camel@pasglop> Mime-Version: 1.0 Cc: miltonm@bga.com, linuxppc-dev@ozlabs.org, paulus@samba.org, David Miller Reply-To: benh@kernel.crashing.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 2008-08-06 at 00:35 -0600, Grant Likely wrote: > On Wed, Aug 6, 2008 at 12:32 AM, David Miller wrote: > > From: Grant Likely > > Date: Wed, 06 Aug 2008 00:02:44 -0600 > > > >> of_lookup_stdout() is useful for figuring out what device to use as output > >> for early boot progress messages. It returns the node pointed to by the > >> linux,stdout-path property in the chosen node. > >> > >> Signed-off-by: Grant Likely > > > > On sparc platforms this is obtained differently. We obtain the 32-bit > > instance value of "/chosen/stdout" and convert that into a prom device > > node path using "instance-to-path". > > How about if I modify it to try both methods? The sparc method however cannot be used on powerpc because it requires a call to OF to do the "live" conversion (ie, instance-to-path). In fact, our /chosen/linux,stdout-path is just a cached result of that conversion done during boot. Ben.