[U-Boot-Users] [PATCH/RFC] mpc5200: switch to CONFIG_OF_LIBFDT

Grant Likely grant.likely at secretlab.ca
Fri Aug 31 19:39:18 CEST 2007


On 8/30/07, Grant Likely <grant.likely at secretlab.ca> wrote:
> On 8/30/07, Kim Phillips <kim.phillips at freescale.com> wrote:
> > On Thu, 30 Aug 2007 12:20:14 -0600
> > Grant Likely <grant.likely at secretlab.ca> wrote:
> >
> > > From: Grant Likely <grant.likely at secretlab.ca>
> > >
> > > Here is a patch which converts the icecube* and tqm5200 boards from using
> > > OF_FLAT_TREE to OF_LIBFDT.  It also fixes the compile of cm5200.
> > >
> > > It's been tested on the lite5200.
> > >
> > > Still to be resolved: is there a better place to put the helper functions.
> >
> > the way you've done them, they probably belong in libfdt space.
> >
> > > diff --git a/board/icecube/icecube.c b/board/icecube/icecube.c
> > > index c027f6f..6a2a77a 100644
> > > --- a/board/icecube/icecube.c
> > > +++ b/board/icecube/icecube.c
> > > @@ -29,9 +29,11 @@
> > >  #include <pci.h>
> > >  #include <asm/processor.h>
> > >
> > > -#if defined(CONFIG_OF_FLAT_TREE)
> > > -#include <ft_build.h>
> > > -#endif
> > > +#ifdef CONFIG_OF_LIBFDT
> > > +#include <libfdt.h>
> >
> > > +#include <libfdt_env.h>
> > > +#include <fdt_support.h>
> >
> > you really don't need (or want) the above two.
>
> Okay, I'll pull them out.
>
> > > -#if defined(CONFIG_OF_FLAT_TREE)
> > > -#include <ft_build.h>
> > > -#endif
> > > +#ifdef CONFIG_OF_LIBFDT
> > > +#include <libfdt.h>
> > > +#include <libfdt_env.h>
> > > +#include <fdt_support.h>
> >
> > ditto.
> >
> > > +#endif /* CONFIG_OF_LIBFDT */
> >
> > do the includes need such protection?
>
> There are a number of 5200 boards that haven't been migrated to
> support fdt yet, so I left the protection in.  I suppose it can be
> removed.

Ignore this comment; I was on crack.. Of course the protections are
not needed for the board specific code.  I'll fix.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195




More information about the U-Boot mailing list