@@ -1140,26 +1140,34 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
ctrl->ops = default_ehci_ops;
rc = ehci_hcd_init(index, init, &ctrl->hccr, &ctrl->hcor);
- if (rc)
+ if (rc) {
+ debug("%s: ehci_hcd_init failed, rc=%d\n", __func__, rc);
return rc;
+ }
if (init == USB_INIT_DEVICE)
goto done;
/* EHCI spec section 4.1 */
- if (ehci_reset(ctrl))
+ if (ehci_reset(ctrl)) {
+ debug("%s: ehci_reset failed\n", __func__);
return -1;
+ }
#if defined(CONFIG_EHCI_HCD_INIT_AFTER_RESET)
rc = ehci_hcd_init(index, init, &ctrl->hccr, &ctrl->hcor);
- if (rc)
+ if (rc) {
+ debug("%s: ehci_hcd_init2 failed, rc=%d\n", __func__, rc);
return rc;
+ }
#endif
#ifdef CONFIG_USB_EHCI_FARADAY
tweaks |= EHCI_TWEAK_NO_INIT_CF;
#endif
rc = ehci_common_init(ctrl, tweaks);
- if (rc)
+ if (rc) {
+ debug("%s: ehci_common_init failed, rc=%d\n", __func__, rc);
return rc;
+ }
ctrl->rootdev = 0;
done:
Add some debugging to detect init failure. Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/usb/host/ehci-hcd.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)