diff options
author | Tom Rini <trini@konsulko.com> | 2016-10-13 20:03:33 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-13 20:03:33 -0400 |
commit | 4504062b271bf4d1cf256e4e87e156de6029e088 (patch) | |
tree | a0cac720a2687f2ed4ccf15f473d06bb7c8dcb07 /common/image.c | |
parent | 44afdc4a12b9f6f48338e7975e4f08cfe90dba74 (diff) | |
parent | 42b7600d62ae288a8c12431d232b89b26ec61721 (diff) | |
download | u-boot-imx-4504062b271bf4d1cf256e4e87e156de6029e088.zip u-boot-imx-4504062b271bf4d1cf256e4e87e156de6029e088.tar.gz u-boot-imx-4504062b271bf4d1cf256e4e87e156de6029e088.tar.bz2 |
Merge git://git.denx.de/u-boot-fdt
Diffstat (limited to 'common/image.c')
-rw-r--r-- | common/image.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/common/image.c b/common/image.c index c0ad36a..0e86c13 100644 --- a/common/image.c +++ b/common/image.c @@ -1305,7 +1305,7 @@ int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images, void *buf; int conf_noffset; int fit_img_result; - char *uname, *name; + const char *uname, *name; int err; int devnum = 0; /* TODO support multi fpga platforms */ const fpga_desc * const desc = fpga_get_desc(devnum); @@ -1332,9 +1332,9 @@ int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images, case IMAGE_FORMAT_FIT: conf_noffset = fit_conf_get_node(buf, images->fit_uname_cfg); - err = fdt_get_string_index(buf, conf_noffset, FIT_FPGA_PROP, 0, - (const char **)&uname); - if (err < 0) { + uname = fdt_stringlist_get(buf, conf_noffset, FIT_FPGA_PROP, 0, + NULL); + if (!uname) { debug("## FPGA image is not specified\n"); return 0; } @@ -1404,7 +1404,7 @@ int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images, int loadables_index; int conf_noffset; int fit_img_result; - char *uname; + const char *uname; /* Check to see if the images struct has a FIT configuration */ if (!genimg_has_config(images)) { @@ -1428,15 +1428,14 @@ int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images, conf_noffset = fit_conf_get_node(buf, images->fit_uname_cfg); for (loadables_index = 0; - fdt_get_string_index(buf, conf_noffset, - FIT_LOADABLE_PROP, - loadables_index, - (const char **)&uname) == 0; + uname = fdt_stringlist_get(buf, conf_noffset, + FIT_LOADABLE_PROP, loadables_index, + NULL), uname; loadables_index++) { fit_img_result = fit_image_load(images, tmp_img_addr, - (const char **)&uname, + &uname, &(images->fit_uname_cfg), arch, IH_TYPE_LOADABLE, BOOTSTAGE_ID_FIT_LOADABLE_START, |