summaryrefslogtreecommitdiff
path: root/cmd/fpga.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-09-07 08:39:12 -0400
committerTom Rini <trini@konsulko.com>2022-09-07 08:39:12 -0400
commite3fce5e5604472a20fbce78ca12d07712f2dd86d (patch)
treed905c39718e772214df0b163f3cf234db4bbda64 /cmd/fpga.c
parentfc2f4085d33cf3e877695e24f63d009134382c48 (diff)
parent857e313a3d44618e09fc64816fd5e561e2189ab7 (diff)
Merge tag 'fsl-qoriq-2022-9-7' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq
- Pali's patch not in my patchwork, got missed. - Sean's patch pending for sometime, I just fix conflict when apply Sean's patch, so pick up.
Diffstat (limited to 'cmd/fpga.c')
-rw-r--r--cmd/fpga.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/cmd/fpga.c b/cmd/fpga.c
index c4651dd403e..9cf7651d8c5 100644
--- a/cmd/fpga.c
+++ b/cmd/fpga.c
@@ -322,7 +322,7 @@ static int do_fpga_loadmk(struct cmd_tbl *cmdtp, int flag, int argc,
case IMAGE_FORMAT_FIT:
{
const void *fit_hdr = (const void *)fpga_data;
- int noffset;
+ int err;
const void *fit_data;
if (!fit_uname) {
@@ -335,23 +335,11 @@ static int do_fpga_loadmk(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
- /* get fpga component image node offset */
- noffset = fit_image_get_node(fit_hdr, fit_uname);
- if (noffset < 0) {
- printf("Can't find '%s' FIT subimage\n", fit_uname);
- return CMD_RET_FAILURE;
- }
-
- /* verify integrity */
- if (!fit_image_verify(fit_hdr, noffset)) {
- puts("Bad Data Hash\n");
- return CMD_RET_FAILURE;
- }
-
- /* get fpga subimage/external data address and length */
- if (fit_image_get_data_and_size(fit_hdr, noffset,
- &fit_data, &data_size)) {
- puts("Fpga subimage data not found\n");
+ err = fit_get_data_node(fit_hdr, fit_uname, &fit_data,
+ &data_size);
+ if (err) {
+ printf("Could not load '%s' subimage (err %d)\n",
+ fit_uname, err);
return CMD_RET_FAILURE;
}