[PATCH] usb: gadget: f_sdp: Add missing spl_board_prepare_for_boot() call

Marek Vasut marex at denx.de
Tue Mar 7 08:42:33 CET 2023


The spl_board_prepare_for_boot() should be called before jump_to_image_no_args()
to perform board-specific deinitialization before jumping to the next stage.
This board-specific deinitialization can be very much anything, e.g. disable
dcache in case it was enabled, or such.

Add the missing spl_board_prepare_for_boot() call into f_sdp .

Signed-off-by: Marek Vasut <marex at denx.de>
---
Cc: Frieder Schrempf <frieder.schrempf at kontron.de>
Cc: Lukasz Majewski <lukma at denx.de>
Cc: Patrick Delaunay <patrick.delaunay at foss.st.com>
Cc: Peng Fan <peng.fan at nxp.com>
Cc: Sean Anderson <sean.anderson at seco.com>
Cc: Sherry Sun <sherry.sun at nxp.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Ye Li <ye.li at nxp.com>
---
 drivers/usb/gadget/f_sdp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c
index 9ea43f29cfb..4da5a160a09 100644
--- a/drivers/usb/gadget/f_sdp.c
+++ b/drivers/usb/gadget/f_sdp.c
@@ -865,6 +865,7 @@ static int sdp_handle_in_ep(struct spl_image_info *spl_image,
 			struct spl_image_info spl_image = {};
 			struct spl_boot_device bootdev = {};
 			spl_parse_image_header(&spl_image, &bootdev, header);
+			spl_board_prepare_for_boot();
 			jump_to_image_no_args(&spl_image);
 #else
 			/* In U-Boot, allow jumps to scripts */
-- 
2.39.2



More information about the U-Boot mailing list