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

Grant Likely grant.likely at secretlab.ca
Mon Sep 3 23:50:58 CEST 2007


On 9/3/07, Bartlomiej Sieka <tur at semihalf.com> wrote:
> Grant Likely wrote:
> [...]
> >>>> -#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.
>
> Could similar protections around ft_board_setup() definition in
> board-specific code be removed as well? I'm thinking about:
>
> #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
> void ft_board_setup(void *blob, bd_t *bd)
> {
>          ft_cpu_setup(blob, bd);
> }
> #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

I considered this, but ultimately decided not to do it (yet).  It is
still possible that someone will want to configure one of these boards
without fdt support.  In this case, the protection around the includes
is benign, but ft_board_setup is not.

Also, there are some boards which use the tqm5200 board code, but
whose config file is not setup to use LIBFDT.

Cheers,
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