]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/gateworks/gw_ventana/gw_ventana.c
imx: ventana: make OTG VBUS power enable board specific
[people/ms/u-boot.git] / board / gateworks / gw_ventana / gw_ventana.c
index 22a3c8e607eadf271f8b4fc50fd6adc58c518347..3f9d2f7010fecb58ed0adda7bbab224735b4dccd 100644 (file)
@@ -175,9 +175,11 @@ int board_ehci_hcd_init(int port)
 
 int board_ehci_power(int port, int on)
 {
-       if (port)
-               return 0;
-       gpio_set_value(GP_USB_OTG_PWR, on);
+       /* enable OTG VBUS */
+       if (!port && board_type < GW_UNKNOWN) {
+               if (gpio_cfg[board_type].otgpwr_en)
+                       gpio_set_value(gpio_cfg[board_type].otgpwr_en, on);
+       }
        return 0;
 }
 #endif /* CONFIG_USB_EHCI_MX6 */