f_sdp: Support searching and loading FIT or container image
authorPeng Fan <peng.fan@nxp.com>
Tue, 18 Aug 2020 10:16:46 +0000 (18:16 +0800)
committerMarek Vasut <marex@denx.de>
Tue, 1 Sep 2020 12:47:43 +0000 (14:47 +0200)
commitb0e9f3e593c0ed1356ff05d99d7a562dc4bf228d
treecbaf3618ca2582d887b78cc84ee743b260b76730
parent5dee7f0b0233f8b4e43e1212a6a96cdee835a8e6
f_sdp: Support searching and loading FIT or container image

Add support to f_sdp to search and load iMX8 container image or iMX8M
FIT image by new UUU command SDPV.

When using the SDPV, the uuu will continue to send out data after first
level boot loader used by ROM. This means uuu won't skip to the offset
of the second boot loader, and the padding data before second boot loader
will be sent out. So we have to search the FIT header or container header
in the buffer that SDP received.

Also change to more common method to exit f_sdp handler not depending on
SPL_FIT_FOUND flag because container loader won't set this.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/usb/gadget/f_sdp.c