int board_usb_init(int index, enum usb_init_type init)
{
+ enable_usb_clocks(index);
switch (index) {
case 0:
if (init == USB_INIT_DEVICE) {
default:
printf("Invalid Controller Index\n");
}
+ disable_usb_clocks(index);
return 0;
}
int board_usb_init(int index, enum usb_init_type init)
{
+ enable_usb_clocks(index);
switch (index) {
case 0:
if (init == USB_INIT_DEVICE) {
printf("port %d can't be used as device\n", index);
+ disable_usb_clocks(index);
return -EINVAL;
} else {
usb_otg_ss1.dr_mode = USB_DR_MODE_HOST;
usb_otg_ss2_glue.vbus_id_status = OMAP_DWC3_VBUS_VALID;
} else {
printf("port %d can't be used as host\n", index);
+ disable_usb_clocks(index);
return -EINVAL;
}
default:
printf("Invalid Controller Index\n");
}
+ disable_usb_clocks(index);
return 0;
}
int board_usb_init(int index, enum usb_init_type init)
{
+ enable_usb_clocks(index);
switch (index) {
case 0:
if (init == USB_INIT_DEVICE) {
default:
printf("Invalid Controller Index\n");
}
+ disable_usb_clocks(index);
return 0;
}
usb_otg_ss_glue.vbus_id_status = OMAP_DWC3_ID_GROUND;
}
+ enable_usb_clocks(index);
ti_usb_phy_uboot_init(&usb_phy_device);
dwc3_omap_uboot_init(&usb_otg_ss_glue);
dwc3_uboot_init(&usb_otg_ss);
ti_usb_phy_uboot_exit(index);
dwc3_uboot_exit(index);
dwc3_omap_uboot_exit(index);
+ disable_usb_clocks(index);
return 0;
}