]> git.sur5r.net Git - u-boot/blobdiff - common/spl/spl_ymodem.c
efi_loader: use TPL_NOTIFY for network timer event
[u-boot] / common / spl / spl_ymodem.c
index 8fbf8958a13409934b8bd05899f4bcdf7179972b..4ab3dcd624d4e6e0576b28710f2dea81954aee11 100644 (file)
@@ -14,7 +14,7 @@
 #include <xyzModem.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
 
 #define BUF_SIZE 1024
 
@@ -103,13 +103,12 @@ static int spl_ymodem_load_image(struct spl_image_info *spl_image,
                info.buf = buf;
                info.image_read = BUF_SIZE;
                load.read = ymodem_read_fit;
-               ret =  spl_load_simple_fit(&load, 0, (void *)buf);
+               ret = spl_load_simple_fit(spl_image, &load, 0, (void *)buf);
                size = info.image_read;
 
                while ((res = xyzModem_stream_read(buf, BUF_SIZE, &err)) > 0)
                        size += res;
        } else {
-               spl_parse_image_header(spl_image, (struct image_header *)buf);
                ret = spl_parse_image_header(spl_image,
                                             (struct image_header *)buf);
                if (ret)
@@ -133,4 +132,4 @@ end_stream:
        printf("Loaded %d bytes\n", size);
        return 0;
 }
-SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_UART, spl_ymodem_load_image);
+SPL_LOAD_IMAGE_METHOD("UART", 0, BOOT_DEVICE_UART, spl_ymodem_load_image);