Skip to contentSkip to conversation

usb: gadget: f_sdp: Add missing spl_board_prepare_for_boot() call

PATCH New Marek Vasut 1 participant 1 message Mar 7, 2023 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: gadget: f_sdp: Add missing spl_board_prepare_for_boot() call

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 .

---
Cc: Frieder Schrempf <[email protected]>
Cc: Lukasz Majewski <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Sherry Sun <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Ye Li <[email protected]>

---
 drivers/usb/gadget/f_sdp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/gadget/f_sdp.c +1 -0
index 9ea43f29cfb..4da5a160a09 100644
@@ -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 */
Signature · 1 line
2.39.2