]> git.sur5r.net Git - u-boot/blobdiff - lib_nios2/bootm.c
microblaze: Correct ffs regression for Microblaze
[u-boot] / lib_nios2 / bootm.c
index 34f5b8ff8296bf5dcc11eb444a67024fe4c0207e..675bfac63a59d5475d160d887fa45b2dbb8618f8 100644 (file)
 #include <common.h>
 #include <command.h>
 #include <asm/byteorder.h>
+#include <asm/cache.h>
 
 int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
 {
        void (*kernel)(void) = (void (*)(void))images->ep;
 
+       if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
+               return 1;
+
+       /* flushes data and instruction caches before calling the kernel */
+       flush_dcache (0,CONFIG_SYS_DCACHE_SIZE);
+       flush_icache (0,CONFIG_SYS_ICACHE_SIZE);
+
        /* For now we assume the Microtronix linux ... which only
         * needs to be called ;-)
         */