Merge branch 'master' of git://git.denx.de/u-boot-usb
This commit is contained in:
@@ -468,8 +468,10 @@ int dfu_config_entities(char *env, char *interface, char *devstr)
|
||||
s = strsep(&env, ";");
|
||||
ret = dfu_fill_entity(&dfu[i], s, alt_num_cnt, interface,
|
||||
devstr);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
free(dfu);
|
||||
return -1;
|
||||
}
|
||||
|
||||
list_add_tail(&dfu[i].list, &dfu_list);
|
||||
alt_num_cnt++;
|
||||
|
||||
@@ -636,7 +636,7 @@ dfu_prepare_strings(struct f_dfu *f_dfu, int n)
|
||||
|
||||
f_dfu->strings = calloc(sizeof(struct usb_string), n + 1);
|
||||
if (!f_dfu->strings)
|
||||
goto enomem;
|
||||
return -ENOMEM;
|
||||
|
||||
for (i = 0; i < n; ++i) {
|
||||
de = dfu_get_entity(i);
|
||||
@@ -647,14 +647,6 @@ dfu_prepare_strings(struct f_dfu *f_dfu, int n)
|
||||
f_dfu->strings[i].s = NULL;
|
||||
|
||||
return 0;
|
||||
|
||||
enomem:
|
||||
while (i)
|
||||
f_dfu->strings[--i].s = NULL;
|
||||
|
||||
free(f_dfu->strings);
|
||||
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static int dfu_prepare_function(struct f_dfu *f_dfu, int n)
|
||||
|
||||
@@ -1088,6 +1088,15 @@ static int dwc2_init_common(struct dwc2_priv *priv)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a 1 second delay here. This gives the host controller
|
||||
* a bit time before the comminucation with the USB devices
|
||||
* is started (the bus is scanned) and fixes the USB detection
|
||||
* problems with some problematic USB keys.
|
||||
*/
|
||||
if (readl(®s->gintsts) & DWC2_GINTSTS_CURMODE_HOST)
|
||||
mdelay(1000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ static void usb_oc_config(int index)
|
||||
}
|
||||
|
||||
/**
|
||||
* board_ehci_hcd_init - override usb phy mode
|
||||
* board_usb_phy_mode - override usb phy mode
|
||||
* @port: usb host/otg port
|
||||
*
|
||||
* Target board specific, override usb_phy_mode.
|
||||
@@ -310,6 +310,7 @@ int ehci_hcd_init(int index, enum usb_init_type init,
|
||||
#endif
|
||||
struct usb_ehci *ehci = (struct usb_ehci *)(USB_BASE_ADDR +
|
||||
(controller_spacing * index));
|
||||
int ret;
|
||||
|
||||
if (index > 3)
|
||||
return -EINVAL;
|
||||
@@ -317,7 +318,9 @@ int ehci_hcd_init(int index, enum usb_init_type init,
|
||||
mdelay(1);
|
||||
|
||||
/* Do board specific initialization */
|
||||
board_ehci_hcd_init(index);
|
||||
ret = board_ehci_hcd_init(index);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
usb_power_config(index);
|
||||
usb_oc_config(index);
|
||||
|
||||
Reference in New Issue
Block a user