From patchwork Wed Apr 29 02:35:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 238789 List-Id: U-Boot discussion From: peng.fan at nxp.com (Peng Fan) Date: Wed, 29 Apr 2020 10:35:13 +0800 Subject: [PATCH 4/5] spl: sdp: Add a callback to clean up USB driver In-Reply-To: <20200429023514.9008-1-peng.fan@nxp.com> References: <20200429023514.9008-1-peng.fan@nxp.com> Message-ID: <20200429023514.9008-4-peng.fan@nxp.com> From: Ye Li 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 Signed-off-by: Peng Fan --- common/spl/spl_sdp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c index 82bce0bd2e..d150951b86 100644 --- a/common/spl/spl_sdp.c +++ b/common/spl/spl_sdp.c @@ -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);