]> git.sur5r.net Git - u-boot/blobdiff - common/cmd_fdt.c
ColdFire 54455: Fix correct boot location for atmel and intel
[u-boot] / common / cmd_fdt.c
index 824088c911284a5f1fc2b6cecb2fbd037232a16a..571b8f14d56f3bc97dcd49eb8465cfdc9988d786 100644 (file)
  */
 DECLARE_GLOBAL_DATA_PTR;
 
-/*
- * Function prototypes/declarations.
- */
-#ifdef CONFIG_OF_BOARD_SETUP
-void ft_board_setup(void *blob, bd_t *bd);
-#endif
-
 static int fdt_valid(void);
 static int fdt_parse_prop(char *pathp, char *prop, char *newval,
        char *data, int *len);
@@ -300,36 +293,28 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                                return err;
                        }
                }
-
+       }
 #ifdef CONFIG_OF_BOARD_SETUP
-       /********************************************************************
-        * Call the board-specific fixup routine
-        ********************************************************************/
-       } else if (argv[1][0] == 'b') {
+       /* Call the board-specific fixup routine */
+       else if (argv[1][0] == 'b')
                ft_board_setup(fdt, gd->bd);
 #endif
-       /********************************************************************
-        * Create a chosen node
-        ********************************************************************/
-       } else if (argv[1][0] == 'c') {
+       /* Create a chosen node */
+       else if (argv[1][0] == 'c')
                fdt_chosen(fdt, 0, 0, 1);
 
-       /********************************************************************
-        * Create a u-boot-env node
-        ********************************************************************/
-       } else if (argv[1][0] == 'e') {
+#ifdef CONFIG_OF_HAS_UBOOT_ENV
+       /* Create a u-boot-env node */
+       else if (argv[1][0] == 'e')
                fdt_env(fdt);
-
-       /********************************************************************
-        * Create a bd_t node
-        ********************************************************************/
-       } else if (argv[1][0] == 'b') {
+#endif
+#ifdef CONFIG_OF_HAS_BD_T
+       /* Create a bd_t node */
+       else if (argv[1][0] == 'b')
                fdt_bd_t(fdt);
-
-       /********************************************************************
-        * Unrecognized command
-        ********************************************************************/
-       } else {
+#endif
+       else {
+               /* Unrecognized command */
                printf ("Usage:\n%s\n", cmdtp->usage);
                return 1;
        }