diff options
author | Frieder Schrempf <frieder.schrempf@kontron.de> | 2019-06-04 21:56:29 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2019-06-27 13:50:28 +0200 |
commit | 2c72ead7387404eba16c556d2f204c52c36c27f9 (patch) | |
tree | efc335707cfcf133857db93717f6ed03fef594fe /common/spl | |
parent | 77f6e2dd0551d8a825bab391a1bd6b838874bcd4 (diff) |
usb: gadget: f_sdp: Allow SPL to load and boot FIT via SDP
Add support for loading u-boot FIT images over the USB SDP protocol in
the SPL
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
[Various build fixes]
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Tested-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'common/spl')
-rw-r--r-- | common/spl/spl_sdp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c index 807256e908..51b245b886 100644 --- a/common/spl/spl_sdp.c +++ b/common/spl/spl_sdp.c @@ -25,10 +25,14 @@ static int spl_sdp_load_image(struct spl_image_info *spl_image, return -ENODEV; } - /* This command typically does not return but jumps to an image */ - sdp_handle(controller_index); - pr_err("SDP ended\n"); + /* + * This command either loads a legacy image, jumps and never returns, + * or it loads a FIT image and returns it to be handled by the SPL + * code. + */ + ret = spl_sdp_handle(controller_index, spl_image); + debug("SDP ended\n"); - return -EINVAL; + return ret; } SPL_LOAD_IMAGE_METHOD("USB SDP", 0, BOOT_DEVICE_BOARD, spl_sdp_load_image); |