Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
[oweals/u-boot.git] / board / gateworks / gw_ventana / gw_ventana.c
index e3737d13985c0af43e3c69b377b802822e5038d8..3b7c82b1dc125fe9c88f7f3921724562a7b1e9bd 100644 (file)
@@ -695,18 +695,14 @@ int misc_init_r(void)
                        *p++ = 0;
 
                        setenv("model_base", str);
-                       if (!getenv("fdt_file1")) {
-                               sprintf(fdt, "%s-%s.dtb", cputype, str);
-                               setenv("fdt_file1", fdt);
-                       }
+                       sprintf(fdt, "%s-%s.dtb", cputype, str);
+                       setenv("fdt_file1", fdt);
                        if (board_type != GW551x && board_type != GW552x)
                                str[4] = 'x';
                        str[5] = 'x';
                        str[6] = 0;
-                       if (!getenv("fdt_file2")) {
-                               sprintf(fdt, "%s-%s.dtb", cputype, str);
-                               setenv("fdt_file2", fdt);
-                       }
+                       sprintf(fdt, "%s-%s.dtb", cputype, str);
+                       setenv("fdt_file2", fdt);
                }
 
                /* initialize env from EEPROM */
@@ -815,9 +811,11 @@ int ft_board_setup(void *blob, bd_t *bd)
                return 0;
        }
 
-       /* Update partition nodes using info from mtdparts env var */
-       puts("   Updating MTD partitions...\n");
-       fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
+       if (test_bit(EECONFIG_NAND, info->config)) {
+               /* Update partition nodes using info from mtdparts env var */
+               puts("   Updating MTD partitions...\n");
+               fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
+       }
 
        /* Update display timings from display env var */
        if (display) {