[U-Boot-Users] [PATCH] fdt: add common memory fixup function
Kumar Gala
galak at kernel.crashing.org
Tue Nov 20 21:34:19 CET 2007
> 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.
There are cases in which we don't want fdt_memory() called as it stands.
- k
More information about the U-Boot
mailing list