summaryrefslogtreecommitdiff
path: root/board/gateworks/gw_ventana/gw_ventana.c
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2017-03-13 08:51:07 -0700
committerStefano Babic <sbabic@denx.de>2017-03-19 17:30:03 +0100
commitf938500f2c810b7535aa6d7ff6d70ff32608572e (patch)
treeb194692efff9deabd6d088ab5937164db2fe2752 /board/gateworks/gw_ventana/gw_ventana.c
parentdb1964cad7b7c72a5bb7a44372cde8c7e9d05d8f (diff)
imx: ventana: make OTG VBUS power enable board specific
Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'board/gateworks/gw_ventana/gw_ventana.c')
-rw-r--r--board/gateworks/gw_ventana/gw_ventana.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 22a3c8e607..3f9d2f7010 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -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 */