]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: sdp: Add a callback to clean up USB driver
authorYe Li <ye.li@nxp.com>
Wed, 29 Apr 2020 02:35:13 +0000 (10:35 +0800)
committerStefano Babic <sbabic@denx.de>
Sun, 3 May 2020 13:31:48 +0000 (15:31 +0200)
Because SDP directly jumps to next level boot image, we'd better
clean up the USB driver before it. Implement a weak callback function,
that spl sdp can use it to clean up USB driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
common/spl/spl_sdp.c

index 82bce0bd2e77d40d23b368e2145a2480f0c115a9..d150951b86b67dc8f6bacd77b8afb6f0eefaad45 100644 (file)
@@ -39,6 +39,7 @@ static int spl_sdp_load_image(struct spl_image_info *spl_image,
        ret = spl_sdp_handle(controller_index, spl_image);
        debug("SDP ended\n");
 
+       board_usb_cleanup(controller_index, USB_INIT_DEVICE);
        return ret;
 }
 SPL_LOAD_IMAGE_METHOD("USB SDP", 0, BOOT_DEVICE_BOARD, spl_sdp_load_image);