diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2018-11-29 10:52:41 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-12-07 16:31:45 +0100 |
commit | a06955ae1ef2a942f18025d4fefceea2c638a76f (patch) | |
tree | 2796cd005202d59118724ce82b10f348b52e9654 /cmd/fastboot.c | |
parent | 57dbc151437b36cc1105857d222df28b095236d7 (diff) | |
download | u-boot-a06955ae1ef2a942f18025d4fefceea2c638a76f.tar.gz |
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/fastboot.c')
-rw-r--r-- | cmd/fastboot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/fastboot.c b/cmd/fastboot.c index ae3a5f627f..0be83b78ac 100644 --- a/cmd/fastboot.c +++ b/cmd/fastboot.c @@ -51,7 +51,7 @@ static int do_fastboot_usb(int argc, char *const argv[], return CMD_RET_FAILURE; } - 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); return CMD_RET_FAILURE; @@ -82,7 +82,7 @@ static int do_fastboot_usb(int argc, char *const argv[], exit: g_dnl_unregister(); g_dnl_clear_detach(); - board_usb_cleanup(controller_index, USB_INIT_DEVICE); + usb_gadget_release(controller_index); return ret; #else |