mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
usb: gadget: Do not call board_usb_xxx() directly in USB gadget drivers
Add 2 functions to wrap the calls to board_usb_init() and board_usb_cleanup(). This is a preparatory work for DM support for UDC drivers (DM_USB_GADGET). Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
committed by
Marek Vasut
parent
57dbc15143
commit
a06955ae1e
@@ -20,7 +20,7 @@ static int do_sdp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
|
||||
char *usb_controller = argv[1];
|
||||
int controller_index = simple_strtoul(usb_controller, NULL, 0);
|
||||
board_usb_init(controller_index, USB_INIT_DEVICE);
|
||||
usb_gadget_initialize(controller_index);
|
||||
|
||||
g_dnl_clear_detach();
|
||||
g_dnl_register("usb_dnl_sdp");
|
||||
@@ -37,7 +37,7 @@ static int do_sdp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
|
||||
exit:
|
||||
g_dnl_unregister();
|
||||
board_usb_cleanup(controller_index, USB_INIT_DEVICE);
|
||||
usb_gadget_release(controller_index);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user