[U-Boot-Users] [PATCH] fdt: add common memory fixup function
Martin Krause
Martin.Krause at tqs.de
Tue Nov 27 09:02:23 CET 2007
Hi Kumar,
sorry for the late response. I've been very busy the last days ...
Kumar Gala wrote on Tuesday, November 20, 2007 9:34 PM:
> > diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
> > index d816349..3381c07 100644
> > --- a/common/cmd_bootm.c
> > +++ b/common/cmd_bootm.c
> > @@ -992,6 +992,16 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
> > do_reset (cmdtp, flag, argc, argv);
> > }
> > #endif
> > + /*
> > + * Add the "/memory" node if it does not exist, and do a fixup
> > + * of the "reg" property with values detected by U-Boot
> > + * (taken from bd->bi_memstart and bd->bi_memsize). + */
> > + if (fdt_memory(of_flat_tree) < 0) {
> > + puts ("ERROR: /memory node create failed - "
> > + "must RESET the board to recover.\n");
> > + do_reset (cmdtp, flag, argc, argv);
> > + }
> > #ifdef CONFIG_OF_BOARD_SETUP
> > /* Call the board-specific fixup routine */
> > ft_board_setup(of_flat_tree, gd->bd);
>
> Was thinking about this some more and realized I don't like
> fdt_memory() getting called via bootm w/o the board code have control.
>
> I think Kim suggest we have a CONFIG_OF_MEMORY_FIXUP that this call is
> wrapped around. But leave fdt_memory() available. I want it such
> that the board code/config is in control of what fixups gets called
> for it.
That's funny. My first patch wrapped the fixup in CONFIG_OF_MEMORY_FIXUP
and it was you, who suggested to drop this ;-). AFAIR Kim suggested to
wrap it in the existing OF_LIBFDT instead - what I did then. But I
have no objections, if you put CONFIG_OF_MEMORY_FIXUP in place again.
Best Regards,
Martin Krause
More information about the U-Boot
mailing list