summaryrefslogtreecommitdiff
path: root/cmd/thordown.c
diff options
context:
space:
mode:
authorJean-Jacques Hiblot <jjhiblot@ti.com>2018-11-29 12:52:41 +0300
committerMarek Vasut <marex@denx.de>2018-12-07 18:31:45 +0300
commita06955ae1ef2a942f18025d4fefceea2c638a76f (patch)
tree2796cd005202d59118724ce82b10f348b52e9654 /cmd/thordown.c
parent57dbc151437b36cc1105857d222df28b095236d7 (diff)
downloadu-boot-a06955ae1ef2a942f18025d4fefceea2c638a76f.tar.xz
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>
Diffstat (limited to 'cmd/thordown.c')
-rw-r--r--cmd/thordown.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/thordown.c b/cmd/thordown.c
index 2615adad75..ce3660d174 100644
--- a/cmd/thordown.c
+++ b/cmd/thordown.c
@@ -30,7 +30,7 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
goto done;
int controller_index = simple_strtoul(usb_controller, NULL, 0);
- ret = board_usb_init(controller_index, USB_INIT_DEVICE);
+ ret = usb_gadget_initialize(controller_index);
if (ret) {
pr_err("USB init failed: %d\n", ret);
ret = CMD_RET_FAILURE;
@@ -55,7 +55,7 @@ int do_thor_down(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);
done:
dfu_free_entities();