Merge branch 'master_merge_new-image' of /home/tur/git/u-boot
[oweals/u-boot.git] / board / mpl / common / common_util.c
index 30c6ca9e30084bde6a8bb68a197ba7c1866534e7..785d20469640b7b1b6552c67345a62397e951725 100644 (file)
@@ -74,7 +74,7 @@ mpl_prg(uchar *src, ulong size)
        info = &flash_info[0];
 
 #if defined(CONFIG_PIP405) || defined(CONFIG_MIP405) || defined(CONFIG_PATI)
-       if (image_to_cpu (magic[0]) != IH_MAGIC) {
+       if (uimage_to_cpu (magic[0]) != IH_MAGIC) {
                puts("Bad Magic number\n");
                return -1;
        }
@@ -181,11 +181,18 @@ mpl_prg_image(uchar *ld_addr)
        image_header_t *hdr = (image_header_t *)ld_addr;
        int rc;
 
+#if defined(CONFIG_FIT)
+       if (genimg_get_format ((void *)hdr) != IMAGE_FORMAT_LEGACY) {
+               puts ("Non legacy image format not supported\n");
+               return -1;
+       }
+#endif
+
        if (!image_check_magic (hdr)) {
                puts("Bad Magic Number\n");
                return 1;
        }
-       print_image_hdr(hdr);
+       image_print_contents (hdr);
        if (!image_check_os (hdr, IH_OS_U_BOOT)) {
                puts("No U-Boot Image\n");
                return 1;