From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from VA3EHSOBE003.bigfish.com (va3ehsobe003.messaging.microsoft.com [216.32.180.13]) by ozlabs.org (Postfix) with ESMTP id 059521007D3 for ; Thu, 15 Jul 2010 01:42:32 +1000 (EST) Subject: Re: [PATCH V4] powerpc/prom: Export device tree physical address via proc From: Matthew McClintock To: Segher Boessenkool In-Reply-To: References: <1279120733-13584-1-git-send-email-msm@freescale.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 14 Jul 2010 10:42:43 -0500 Message-ID: <1279122163.13098.2.camel@localhost> MIME-Version: 1.0 Cc: Kumar Gala , linuxppc-dev@lists.ozlabs.org, Timur Tabi List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 2010-07-14 at 17:35 +0200, Segher Boessenkool wrote: > > V4: Fixed misspelling > > Any particular reason you fixed only one of the two > mispelings I pointed out? (device tree is two words, > not one). Ahh, my fault. > > > + prop = of_find_property(node, "linux,devicetree-start", NULL); > > + if (prop) > > + prom_remove_property(node, prop); > > + > > + prop = of_find_property(node, "linux,devicetree-end", NULL); > > + if (prop) > > + prom_remove_property(node, prop); > > + > > + flat_dt_start = virt_to_phys(initial_boot_params); > > + flat_dt_end = virt_to_phys(initial_boot_params) > > + + initial_boot_params->totalsize; > > + prom_add_property(node, &flat_dt_start_prop); > > + prom_add_property(node, &flat_dt_end_prop); > > You could use one property instead of two; use addr+len > like every other property does. > > You also should use a better name for the property; is this > the previous kernel's device tree? Just "device-tree" makes > no sense, it is not pointing to "the" device tree for sure! > What about just one node called "flat-device-tree"? -Matthew