[PATCH 1/3] fdt.c: Add non-boottime device tree functions

Stephen Neuendorffer stephen.neuendorffer at xilinx.com
Thu Nov 18 09:53:16 EST 2010



> -----Original Message-----
> From: Grant Likely [mailto:glikely at secretlab.ca] On Behalf Of Grant
Likely
> Sent: Wednesday, November 17, 2010 11:42 AM
> To: Stephen Neuendorffer
> Cc: dirk.brandewie at gmail.com; devicetree-discuss at lists.ozlabs.org
> Subject: Re: [PATCH 1/3] fdt.c: Add non-boottime device tree functions
> 
> On Wed, Nov 17, 2010 at 11:15:43AM -0800, Stephen Neuendorffer wrote:
> > In preparation for providing run-time handling of device trees,
factor
> > out some of the basic functions so that they take an arbitrary blob,
> > rather than relying on the single boot-time tree.
> >
> > Signed-off-by: Stephen Neuendorffer
<stephen.neuendorffer at xilinx.com>
> > ---
> >  drivers/of/fdt.c       |  129
++++++++++++++++++++++++++++++-----------------
> >  include/linux/of_fdt.h |    9 +++
> >  2 files changed, 91 insertions(+), 47 deletions(-)
> >
> > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> > index c1360e0..6ae207a 100644
> > --- a/drivers/of/fdt.c
> > +++ b/drivers/of/fdt.c
> > @@ -22,6 +22,86 @@
> >
> >  #include <asm/page.h>
> >
> > +char *fdt_get_string(u32 offset,
> > +			  struct boot_param_header *blob)
> 
> nitpicking: Encouraged naming convention is of_flat_dt_* for this
> file.  Also, I think it makes more sense for blob to be the first
> argument in all of these functions.

If I do the rename, then of_flat_dt_is_compatible has a conflict with
the non-blob function, which is
used all over the place in the powerpc platform code.  It seems like
there's already alot of nonsense
between drivers/of/fdt.c, CONFIG_FLATTREE, and of_flat_dt_* conventions.
Perhaps a non conflicting
convention?  of_fdt_* (to match the file) or flattree_* (to match the
Kconfig option).

Suggestions?

Steve


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.




More information about the devicetree-discuss mailing list