fdt: allow for builds that don't want env and bd_t nodes

protect fdt_env and fdt_bd_t invocations, fix codingstyle while in the
area.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
master
Kim Phillips 17 years ago committed by Gerald Van Baren
parent 91148bf7ae
commit 99dffca3b7
  1. 38
      common/cmd_fdt.c

@ -293,36 +293,28 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
return err; return err;
} }
} }
}
#ifdef CONFIG_OF_BOARD_SETUP #ifdef CONFIG_OF_BOARD_SETUP
/******************************************************************** /* Call the board-specific fixup routine */
* Call the board-specific fixup routine else if (argv[1][0] == 'b')
********************************************************************/
} else if (argv[1][0] == 'b') {
ft_board_setup(fdt, gd->bd); ft_board_setup(fdt, gd->bd);
#endif #endif
/******************************************************************** /* Create a chosen node */
* Create a chosen node else if (argv[1][0] == 'c')
********************************************************************/
} else if (argv[1][0] == 'c') {
fdt_chosen(fdt, 0, 0, 1); fdt_chosen(fdt, 0, 0, 1);
/******************************************************************** #ifdef CONFIG_OF_HAS_UBOOT_ENV
* Create a u-boot-env node /* Create a u-boot-env node */
********************************************************************/ else if (argv[1][0] == 'e')
} else if (argv[1][0] == 'e') {
fdt_env(fdt); fdt_env(fdt);
#endif
/******************************************************************** #ifdef CONFIG_OF_HAS_BD_T
* Create a bd_t node /* Create a bd_t node */
********************************************************************/ else if (argv[1][0] == 'b')
} else if (argv[1][0] == 'b') {
fdt_bd_t(fdt); fdt_bd_t(fdt);
#endif
/******************************************************************** else {
* Unrecognized command /* Unrecognized command */
********************************************************************/
} else {
printf ("Usage:\n%s\n", cmdtp->usage); printf ("Usage:\n%s\n", cmdtp->usage);
return 1; return 1;
} }

Loading…
Cancel
Save