fdt: Move fdt_fixup_ethernet to a common place
[oweals/u-boot.git] / common / bootm_os.c
index e3f5a4641207e41a387cbf941fb1d23afde0fdc0..e1024069766ac949462603479bd609d8f1c287f3 100644 (file)
@@ -288,8 +288,6 @@ void do_bootvx_fdt(bootm_headers_t *images)
                if (ret)
                        return;
 
-               fdt_fixup_ethernet(*of_flat_tree);
-
                ret = fdt_add_subnode(*of_flat_tree, 0, "chosen");
                if ((ret >= 0 || ret == -FDT_ERR_EXISTS)) {
                        bootline = getenv("bootargs");
@@ -353,6 +351,7 @@ static int do_bootm_qnxelf(int flag, int argc, char * const argv[],
 {
        char *local_args[2];
        char str[16];
+       int dcache;
 
        if (flag != BOOTM_STATE_OS_GO)
                return 0;
@@ -367,8 +366,19 @@ static int do_bootm_qnxelf(int flag, int argc, char * const argv[],
        sprintf(str, "%lx", images->ep); /* write entry-point into string */
        local_args[0] = argv[0];
        local_args[1] = str;    /* and provide it via the arguments */
+
+       /*
+        * QNX images require the data cache is disabled.
+        */
+       dcache = dcache_status();
+       if (dcache)
+               dcache_disable();
+
        do_bootelf(NULL, 0, 2, local_args);
 
+       if (dcache)
+               dcache_enable();
+
        return 1;
 }
 #endif