Merge tag 'dm-pull-3dec19' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
[platform/kernel/u-boot.git] / net / tftp.c
index eca801a..5a69bca 100644 (file)
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <command.h>
 #include <efi_loader.h>
+#include <env.h>
 #include <mapmem.h>
 #include <net.h>
 #include <net/tftp.h>
@@ -606,8 +607,7 @@ static int tftp_init_load_addr(void)
        struct lmb lmb;
        phys_size_t max_size;
 
-       lmb_init_and_reserve(&lmb, gd->bd->bi_dram[0].start,
-                            gd->bd->bi_dram[0].size, (void *)gd->fdt_blob);
+       lmb_init_and_reserve(&lmb, gd->bd, (void *)gd->fdt_blob);
 
        max_size = lmb_get_free_size(&lmb, load_addr);
        if (!max_size)