summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb-new/sunxi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index ee018c7..cafb480 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -217,6 +217,11 @@ static int sunxi_musb_enable(struct musb *musb)
printf("A charger is plugged into the OTG: ");
return -ENODEV;
}
+ ret = sunxi_usb_phy_id_detect(0);
+ if (ret == 1) {
+ printf("No host cable detected: ");
+ return -ENODEV;
+ }
sunxi_usb_phy_power_on(0); /* port power on */
}