]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
image: Rename load_addr, save_addr, save_size
authorSimon Glass <sjg@chromium.org>
Sat, 28 Dec 2019 17:45:02 +0000 (10:45 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 17 Jan 2020 19:02:35 +0000 (14:02 -0500)
These global variables are quite short and generic. In fact the same name
is more often used locally for struct members and function arguments.

Add a image_ prefix to make them easier to distinguish.

Signed-off-by: Simon Glass <sjg@chromium.org>
27 files changed:
cmd/bmp.c
cmd/booti.c
cmd/bootm.c
cmd/bootz.c
cmd/cramfs.c
cmd/disk.c
cmd/elf.c
cmd/jffs2.c
cmd/load.c
cmd/mvebu/bubt.c
cmd/nand.c
cmd/net.c
cmd/pxe_utils.c
cmd/reiser.c
cmd/source.c
cmd/ximg.c
cmd/zfs.c
common/board_r.c
common/image-fdt.c
common/image.c
common/spl/spl_net.c
common/update.c
drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c
include/common.h
net/net.c
net/nfs.c
net/tftp.c

index d2a39f677fda9fa567da98ef1ca67467ef0bdd40..1e4c9720fea0a19f4edeab9e17db6dd788a5414b 100644 (file)
--- a/cmd/bmp.c
+++ b/cmd/bmp.c
@@ -95,8 +95,8 @@ static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[
        ulong addr;
 
        switch (argc) {
-       case 1:         /* use load_addr as default address */
-               addr = load_addr;
+       case 1:         /* use image_load_addr as default address */
+               addr = image_load_addr;
                break;
        case 2:         /* use argument */
                addr = simple_strtoul(argv[1], NULL, 16);
@@ -116,8 +116,8 @@ static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar
        splash_get_pos(&x, &y);
 
        switch (argc) {
-       case 1:         /* use load_addr as default address */
-               addr = load_addr;
+       case 1:         /* use image_load_addr as default address */
+               addr = image_load_addr;
                break;
        case 2:         /* use argument */
                addr = simple_strtoul(argv[1], NULL, 16);
index d0671deb759cebbd127a7b7dc91b7af621ab815c..de5058236e0a03dbad1e0706b124499d75edfb93 100644 (file)
@@ -30,9 +30,9 @@ static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc,
 
        /* Setup Linux kernel Image entry point */
        if (!argc) {
-               ld = load_addr;
+               ld = image_load_addr;
                debug("*  kernel: default image load address = 0x%08lx\n",
-                               load_addr);
+                               image_load_addr);
        } else {
                ld = simple_strtoul(argv[0], NULL, 16);
                debug("*  kernel: cmdline image address = 0x%08lx\n", ld);
index 62ee7c4b8a169bb202483109c5a9fbf78f1277af..931d53f0c7209c77f4d35ac16c03f86dc75fe72b 100644 (file)
@@ -144,7 +144,8 @@ int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd)
                char *local_args[2];
                local_args[0] = (char *)cmd;
                local_args[1] = NULL;
-               printf("Automatic boot of image at addr 0x%08lX ...\n", load_addr);
+               printf("Automatic boot of image at addr 0x%08lX ...\n",
+                      image_load_addr);
                return do_bootm(cmdtp, 0, 1, local_args);
        }
 
@@ -232,7 +233,7 @@ static int do_iminfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        int     rcode = 0;
 
        if (argc < 2) {
-               return image_info(load_addr);
+               return image_info(image_load_addr);
        }
 
        for (arg = 1; arg < argc; ++arg) {
index 74be62c2c5e45885d5544aba1c74e1b791826b9b..7bfc491221a5af4c7ccaec217c009fef462f03d4 100644 (file)
@@ -33,9 +33,9 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc,
 
        /* Setup Linux kernel zImage entry point */
        if (!argc) {
-               images->ep = load_addr;
+               images->ep = image_load_addr;
                debug("*  kernel: default image load address = 0x%08lx\n",
-                               load_addr);
+                               image_load_addr);
        } else {
                images->ep = simple_strtoul(argv[0], NULL, 16);
                debug("*  kernel: cmdline image address = 0x%08lx\n",
index 2188910b2a77833c393ed113c84176cffd1dbdf3..1bc987528f084321f98d7ef02dde7f761a9ae905 100644 (file)
@@ -97,7 +97,7 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        char *filename;
        int size;
-       ulong offset = load_addr;
+       ulong offset = image_load_addr;
        char *offset_virt;
 
        struct part_info part;
@@ -127,7 +127,7 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        }
        if (argc == 3) {
                offset = simple_strtoul(argv[1], NULL, 0);
-               load_addr = offset;
+               image_load_addr = offset;
                filename = argv[2];
        }
 
index 437c1753740c848a2d184febd7b0c3f62ac1439c..c57561b3cb79b93d37038e1a2c3c0a9d58a52a69 100644 (file)
@@ -124,7 +124,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
        flush_cache(addr, (cnt+1)*info.blksz);
 
        /* Loading ok, update default load address */
-       load_addr = addr;
+       image_load_addr = addr;
 
        return bootm_maybe_autostart(cmdtp, argv[0]);
 }
index 32f12a72b9be4bb07f81ffb66207af40a1965b18..57736f997bf856f0a49d62c9f8383ec8b86f8bba 100644 (file)
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -294,7 +294,7 @@ int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                /* Consume address */
                argc--; argv++;
        } else
-               addr = load_addr;
+               addr = image_load_addr;
 
        if (!valid_elf_image(addr))
                return 1;
@@ -348,7 +348,7 @@ int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
         * If we don't know where the image is then we're done.
         */
        if (argc < 2)
-               addr = load_addr;
+               addr = image_load_addr;
        else
                addr = simple_strtoul(argv[1], NULL, 16);
 
index b47cd3d98930a4a80ee4fbdc55d4afaad036c795..672ed43b3f3cadf42cbe632935dd7d3a4156172b 100644 (file)
@@ -476,7 +476,7 @@ int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        char *filename;
        int size;
        struct part_info *part;
-       ulong offset = load_addr;
+       ulong offset = image_load_addr;
 
        /* pre-set Boot file name */
        filename = env_get("bootfile");
@@ -488,7 +488,7 @@ int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        }
        if (argc == 3) {
                offset = simple_strtoul(argv[1], NULL, 16);
-               load_addr = offset;
+               image_load_addr = offset;
                filename = argv[2];
        }
 
index 68ff3010b47f2e115a2cbb65970b8eec9c4f6f9c..bed973ede9127942a306fe0dc2657cbf181e6927 100644 (file)
@@ -109,7 +109,7 @@ static int do_load_serial(cmd_tbl_t *cmdtp, int flag, int argc,
                rcode = 1;
        } else {
                printf("## Start Addr      = 0x%08lX\n", addr);
-               load_addr = addr;
+               image_load_addr = addr;
        }
 
 #ifdef CONFIG_SYS_LOADS_BAUD_CHANGE
@@ -485,12 +485,12 @@ static int do_load_serial_bin(cmd_tbl_t *cmdtp, int flag, int argc,
                addr = load_serial_bin(offset);
 
                if (addr == ~0) {
-                       load_addr = 0;
+                       image_load_addr = 0;
                        printf("## Binary (kermit) download aborted\n");
                        rcode = 1;
                } else {
                        printf("## Start Addr      = 0x%08lX\n", addr);
-                       load_addr = addr;
+                       image_load_addr = addr;
                }
        }
        if (load_baudrate != current_baudrate) {
index 84d2d531f0d43c04dae1bfa0a687f24306b4b905..6c68620d147f02bb59789259c8bac5902526d393 100644 (file)
@@ -423,8 +423,10 @@ static int is_usb_active(void)
 #ifdef CONFIG_CMD_NET
 static size_t tftp_read_file(const char *file_name)
 {
-       /* update global variable load_addr before tftp file from network */
-       load_addr = get_load_addr();
+       /*
+        * update global variable image_load_addr before tftp file from network
+        */
+       image_load_addr = get_load_addr();
        return net_loop(TFTPGET);
 }
 
index 5bda69e819b0c4aa4ec16becba073866db3e7694..92089a73c172def64dddbef677b1b05727d666fc 100644 (file)
@@ -925,7 +925,7 @@ static int nand_load_image(cmd_tbl_t *cmdtp, struct mtd_info *mtd,
 
        /* Loading ok, update default load address */
 
-       load_addr = addr;
+       image_load_addr = addr;
 
        return bootm_maybe_autostart(cmdtp, cmd);
 }
index 237403977e8006c651182d01534912aaeeca9676..6bce214e45a7b2c8e700e5d3baa74214abba393c 100644 (file)
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -186,10 +186,10 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
 
        net_boot_file_name_explicit = false;
 
-       /* pre-set load_addr */
+       /* pre-set image_load_addr */
        s = env_get("loadaddr");
        if (s != NULL)
-               load_addr = simple_strtoul(s, NULL, 16);
+               image_load_addr = simple_strtoul(s, NULL, 16);
 
        switch (argc) {
        case 1:
@@ -206,7 +206,7 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
                 */
                addr = simple_strtoul(argv[1], &end, 16);
                if (end == (argv[1] + strlen(argv[1]))) {
-                       load_addr = addr;
+                       image_load_addr = addr;
                        /* refresh bootfile name from env */
                        copy_filename(net_boot_file_name, env_get("bootfile"),
                                      sizeof(net_boot_file_name));
@@ -218,7 +218,7 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
                break;
 
        case 3:
-               load_addr = simple_strtoul(argv[1], NULL, 16);
+               image_load_addr = simple_strtoul(argv[1], NULL, 16);
                net_boot_file_name_explicit = true;
                copy_filename(net_boot_file_name, argv[2],
                              sizeof(net_boot_file_name));
@@ -227,8 +227,8 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
 
 #ifdef CONFIG_CMD_TFTPPUT
        case 4:
-               if (strict_strtoul(argv[1], 16, &save_addr) < 0 ||
-                   strict_strtoul(argv[2], 16, &save_size) < 0) {
+               if (strict_strtoul(argv[1], 16, &image_save_addr) < 0 ||
+                   strict_strtoul(argv[2], 16, &image_save_size) < 0) {
                        printf("Invalid address/size\n");
                        return CMD_RET_USAGE;
                }
index a636346bb51ff0a88603133cda331230e40df0db..ff8b0dcd7b82c727c829a3c09c0524dde8966f25 100644 (file)
@@ -1310,9 +1310,9 @@ void handle_pxe_menu(cmd_tbl_t *cmdtp, struct pxe_menu *cfg)
 #ifdef CONFIG_CMD_BMP
        /* display BMP if available */
        if (cfg->bmp) {
-               if (get_relfile(cmdtp, cfg->bmp, load_addr)) {
+               if (get_relfile(cmdtp, cfg->bmp, image_load_addr)) {
                        run_command("cls", 0);
-                       bmp_display(load_addr,
+                       bmp_display(image_load_addr,
                                    BMP_ALIGN_CENTER, BMP_ALIGN_CENTER);
                } else {
                        printf("Skipping background bmp %s for failure\n",
index 7f51b927a47548c074390cbab4939e98a9f5d498..598fab48b322d8231b7b9e9a66ddac103c34a49f 100644 (file)
@@ -154,7 +154,7 @@ int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        }
 
        /* Loading ok, update default load address */
-       load_addr = addr;
+       image_load_addr = addr;
 
        printf ("\n%ld bytes read\n", filelen);
        env_set_hex("filesize", filelen);
index 3a51ebf0b665c5d58db508f5d6b453f1bd64463a..be1135014f8e18100d8c8324b48a8d7a89c4c48d 100644 (file)
@@ -172,7 +172,8 @@ static int do_source(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                addr = CONFIG_SYS_LOAD_ADDR;
                debug ("*  source: default load address = 0x%08lx\n", addr);
 #if defined(CONFIG_FIT)
-       } else if (fit_parse_subimage (argv[1], load_addr, &addr, &fit_uname)) {
+       } else if (fit_parse_subimage(argv[1], image_load_addr, &addr,
+                                     &fit_uname)) {
                debug ("*  source: subimage '%s' from FIT image at 0x%08lx\n",
                                fit_uname, addr);
 #endif
index 22b2037a33f51187a5c024717811d372a434d99b..dccd1143a7a5bc5c3dc46ad13bc3a7a13c27f278 100644 (file)
@@ -33,7 +33,7 @@
 static int
 do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 {
-       ulong           addr = load_addr;
+       ulong           addr = image_load_addr;
        ulong           dest = 0;
        ulong           data, len;
        int             verify;
index ed5402bb139e541d78528b68b4a80259f994fd1f..153313063562815e721f5dee1abbd0702a1cd1ed 100644 (file)
--- a/cmd/zfs.c
+++ b/cmd/zfs.c
@@ -112,7 +112,7 @@ static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
        zfs_close(&zfile);
 
        /* Loading ok, update default load address */
-       load_addr = addr;
+       image_load_addr = addr;
 
        printf("%llu bytes read\n", zfile.size);
        env_set_hex("filesize", zfile.size);
index 0102da7efd0f4fc61b5e08a27b1d57c834727c4c..cf3a5f7b7398d10373b69227aec791edc47d179b 100644 (file)
@@ -484,7 +484,7 @@ static int initr_env(void)
 #endif
 
        /* Initialize from environment */
-       load_addr = env_get_ulong("loadaddr", 16, load_addr);
+       image_load_addr = env_get_ulong("loadaddr", 16, image_load_addr);
 
        return 0;
 }
index 48388488d98defeeabd7641000d68f517aaf6a1f..dbb1e6e131c8e06c745320a6b27eb8d9b435b462 100644 (file)
@@ -285,7 +285,8 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
        *of_flat_tree = NULL;
        *of_size = 0;
 
-       img_addr = (argc == 0) ? load_addr : simple_strtoul(argv[0], NULL, 16);
+       img_addr = (argc == 0) ? image_load_addr :
+                       simple_strtoul(argv[0], NULL, 16);
        buf = map_sysmem(img_addr, 0);
 
        if (argc > 2)
@@ -304,7 +305,7 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
                        else if (images->fit_uname_os)
                                default_addr = (ulong)images->fit_hdr_os;
                        else
-                               default_addr = load_addr;
+                               default_addr = image_load_addr;
 
                        if (fit_parse_conf(select, default_addr,
                                           &fdt_addr, &fit_uname_config)) {
index 75d5dd944ff0487bb0d712b1388c149343ac30fc..2288cff1266132529e462b8112d63796862b5c2a 100644 (file)
@@ -557,9 +557,9 @@ static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch,
 /* Shared dual-format routines */
 /*****************************************************************************/
 #ifndef USE_HOSTCC
-ulong load_addr = CONFIG_SYS_LOAD_ADDR;        /* Default Load Address */
-ulong save_addr;                       /* Default Save Address */
-ulong save_size;                       /* Default Save Size (in bytes) */
+ulong image_load_addr = CONFIG_SYS_LOAD_ADDR;  /* Default Load Address */
+ulong image_save_addr;                 /* Default Save Address */
+ulong image_save_size;                 /* Default Save Size (in bytes) */
 
 static int on_loadaddr(const char *name, const char *value, enum env_op op,
        int flags)
@@ -567,7 +567,7 @@ static int on_loadaddr(const char *name, const char *value, enum env_op op,
        switch (op) {
        case env_op_create:
        case env_op_overwrite:
-               load_addr = simple_strtoul(value, NULL, 16);
+               image_load_addr = simple_strtoul(value, NULL, 16);
                break;
        default:
                break;
@@ -936,15 +936,15 @@ ulong genimg_get_kernel_addr_fit(char * const img_addr,
 
        /* find out kernel image address */
        if (!img_addr) {
-               kernel_addr = load_addr;
+               kernel_addr = image_load_addr;
                debug("*  kernel: default image load address = 0x%08lx\n",
-                     load_addr);
+                     image_load_addr);
 #if CONFIG_IS_ENABLED(FIT)
-       } else if (fit_parse_conf(img_addr, load_addr, &kernel_addr,
+       } else if (fit_parse_conf(img_addr, image_load_addr, &kernel_addr,
                                  fit_uname_config)) {
                debug("*  kernel: config '%s' from image at 0x%08lx\n",
                      *fit_uname_config, kernel_addr);
-       } else if (fit_parse_subimage(img_addr, load_addr, &kernel_addr,
+       } else if (fit_parse_subimage(img_addr, image_load_addr, &kernel_addr,
                                     fit_uname_kernel)) {
                debug("*  kernel: subimage '%s' from image at 0x%08lx\n",
                      *fit_uname_kernel, kernel_addr);
@@ -1102,7 +1102,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
                        if (images->fit_uname_os)
                                default_addr = (ulong)images->fit_hdr_os;
                        else
-                               default_addr = load_addr;
+                               default_addr = image_load_addr;
 
                        if (fit_parse_conf(select, default_addr,
                                           &rd_addr, &fit_uname_config)) {
index 803303249c72c623a886ee3425e95b6c26de330c..30c050c0b3e6c0767bf1d607ab63037f919da7a7 100644 (file)
@@ -19,14 +19,14 @@ static ulong spl_net_load_read(struct spl_load_info *load, ulong sector,
 {
        debug("%s: sector %lx, count %lx, buf %lx\n",
              __func__, sector, count, (ulong)buf);
-       memcpy(buf, (void *)(load_addr + sector), count);
+       memcpy(buf, (void *)(image_load_addr + sector), count);
        return count;
 }
 
 static int spl_net_load_image(struct spl_image_info *spl_image,
                              struct spl_boot_device *bootdev)
 {
-       struct image_header *header = (struct image_header *)load_addr;
+       struct image_header *header = (struct image_header *)image_load_addr;
        int rv;
 
        env_init();
index 13b09ab00f37f602bbe75c2685c7b1d146e7f0ff..bfb760e52a2dc99d721c40b259103fdbbf794800 100644 (file)
@@ -45,7 +45,6 @@
 
 extern ulong tftp_timeout_ms;
 extern int tftp_timeout_count_max;
-extern ulong load_addr;
 #ifdef CONFIG_MTD_NOR_FLASH
 extern flash_info_t flash_info[];
 static uchar *saved_prot_info;
@@ -72,7 +71,7 @@ static int update_load(char *filename, ulong msec_max, int cnt_max, ulong addr)
        env_set("netretry", "no");
 
        /* download the update file */
-       load_addr = addr;
+       image_load_addr = addr;
        copy_filename(net_boot_file_name, filename, sizeof(net_boot_file_name));
        size = net_loop(TFTPGET);
 
index 74417d61b4c536590956763e2ee215e329f0f443..27610d48cff9ad7ba9f157c2fa13bda69fc256d1 100644 (file)
@@ -612,9 +612,9 @@ int ddr3_tip_load_pattern_to_odpg(u32 dev_num, enum hws_access_type access_type,
                              MASK_ALL_BITS));
        }
 
-       CHECK_STATUS(ddr3_tip_if_write
-                    (dev_num, access_type, if_id,
-                     ODPG_DATA_BUFFER_OFFS_REG, load_addr, MASK_ALL_BITS));
+       CHECK_STATUS(ddr3_tip_if_write(dev_num, access_type, if_id,
+                                      ODPG_DATA_BUFFER_OFFS_REG,
+                                      image_load_addr, MASK_ALL_BITS));
 
        return MV_OK;
 }
index f4a9dc325ffc8473de2302ff34ef642e15ac771b..09b5f62ae3141553d7c5c28f7f0a9a44e41895d4 100644 (file)
@@ -62,9 +62,9 @@ void  hang            (void) __attribute__ ((noreturn));
 /* common/cmd_source.c */
 int    source (ulong addr, const char *fit_uname);
 
-extern ulong load_addr;                /* Default Load Address */
-extern ulong save_addr;                /* Default Save Address */
-extern ulong save_size;                /* Default Save Size */
+extern ulong image_load_addr;          /* Default Load Address */
+extern ulong image_save_addr;          /* Default Save Address */
+extern ulong image_save_size;          /* Default Save Size */
 
 /* common/memsize.c */
 long   get_ram_size  (long *, long);
index 5199d679a1fbfc9c3d24d3d0577d7e5a375fe4f4..b9bf0d1a8b521cb2623a9b8857a6a66aa5778886 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -636,7 +636,7 @@ restart:
                                printf("Bytes transferred = %d (%x hex)\n",
                                       net_boot_file_size, net_boot_file_size);
                                env_set_hex("filesize", net_boot_file_size);
-                               env_set_hex("fileaddr", load_addr);
+                               env_set_hex("fileaddr", image_load_addr);
                        }
                        if (protocol != NETCONS)
                                eth_halt();
index f4101eb17c3eee1d3ab660b6cc0ef514a23992c0..5226e2c163eeb5b65fd47257deb9fbfc8c9ddce6 100644 (file)
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -88,14 +88,15 @@ static inline int store_block(uchar *src, unsigned offset, unsigned len)
 
        for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) {
                /* start address in flash? */
-               if (load_addr + offset >= flash_info[i].start[0]) {
+               if (image_load_addr + offset >= flash_info[i].start[0]) {
                        rc = 1;
                        break;
                }
        }
 
        if (rc) { /* Flash is destination for this packet */
-               rc = flash_write((uchar *)src, (ulong)(load_addr+offset), len);
+               rc = flash_write((uchar *)src, (ulong)image_load_addr + offset,
+                                len);
                if (rc) {
                        flash_perror(rc);
                        return -1;
@@ -103,7 +104,7 @@ static inline int store_block(uchar *src, unsigned offset, unsigned len)
        } else
 #endif /* CONFIG_SYS_DIRECT_FLASH_NFS */
        {
-               void *ptr = map_sysmem(load_addr + offset, len);
+               void *ptr = map_sysmem(image_load_addr + offset, len);
 
                memcpy(ptr, src, len);
                unmap_sysmem(ptr);
@@ -912,7 +913,7 @@ void nfs_start(void)
                       net_boot_file_expected_size_in_blocks << 9);
                print_size(net_boot_file_expected_size_in_blocks << 9, "");
        }
-       printf("\nLoad address: 0x%lx\nLoading: *\b", load_addr);
+       printf("\nLoad address: 0x%lx\nLoading: *\b", image_load_addr);
 
        net_set_timeout_handler(nfs_timeout, nfs_timeout_handler);
        net_set_udp_handler(nfs_handler);
index 1e3c18ae69c0f975e22383fcdcba18bcee0eec38..899d3b89d3e028339d18d145af4c09c8c1fffc24 100644 (file)
@@ -221,7 +221,7 @@ static int load_block(unsigned block, uchar *dst, unsigned len)
        ulong tosend = len;
 
        tosend = min(net_boot_file_size - offset, tosend);
-       (void)memcpy(dst, (void *)(save_addr + offset), tosend);
+       (void)memcpy(dst, (void *)(image_save_addr + offset), tosend);
        debug("%s: block=%d, offset=%ld, len=%d, tosend=%ld\n", __func__,
              block, offset, len, tosend);
        return tosend;
@@ -605,7 +605,7 @@ static void tftp_timeout_handler(void)
        }
 }
 
-/* Initialize tftp_load_addr and tftp_load_size from load_addr and lmb */
+/* Initialize tftp_load_addr and tftp_load_size from image_load_addr and lmb */
 static int tftp_init_load_addr(void)
 {
 #ifdef CONFIG_LMB
@@ -614,13 +614,13 @@ static int tftp_init_load_addr(void)
 
        lmb_init_and_reserve(&lmb, gd->bd, (void *)gd->fdt_blob);
 
-       max_size = lmb_get_free_size(&lmb, load_addr);
+       max_size = lmb_get_free_size(&lmb, image_load_addr);
        if (!max_size)
                return -1;
 
        tftp_load_size = max_size;
 #endif
-       tftp_load_addr = load_addr;
+       tftp_load_addr = image_load_addr;
        return 0;
 }
 
@@ -710,9 +710,9 @@ void tftp_start(enum proto_t protocol)
 #ifdef CONFIG_CMD_TFTPPUT
        tftp_put_active = (protocol == TFTPPUT);
        if (tftp_put_active) {
-               printf("Save address: 0x%lx\n", save_addr);
-               printf("Save size:    0x%lx\n", save_size);
-               net_boot_file_size = save_size;
+               printf("Save address: 0x%lx\n", image_save_addr);
+               printf("Save size:    0x%lx\n", image_save_size);
+               net_boot_file_size = image_save_size;
                puts("Saving: *\b");
                tftp_state = STATE_SEND_WRQ;
                new_transfer();