summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-mx6.c
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-07-13 00:25:38 -0700
committerStefano Babic <sbabic@denx.de>2016-07-19 19:52:14 +0200
commitc4483093f38f20c4122bd27456bffdda518e4d71 (patch)
treed6b6735a7ce1cff267cd97d3371e732ac8c3f3b4 /drivers/usb/host/ehci-mx6.c
parent9a88180bfbb6ee7b2fba5516391ff0e611794de5 (diff)
usb: ehci-mx6: introduce config for high active power pin
Add a new config CONFIG_MXC_USB_OTG_HACTIVE which configures the OTG Power Pin to be high active. Low active is the reset value of the affected configuration register, hence the config option is named by the non-reset configuration. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'drivers/usb/host/ehci-mx6.c')
-rw-r--r--drivers/usb/host/ehci-mx6.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 277f461646..8352c2bfc5 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -216,7 +216,11 @@ static void usb_power_config(int index)
clrbits_le32(phy_cfg2, USBNC_PHYCFG2_ACAENB);
/* Set power polarity to high active */
+#ifdef CONFIG_MXC_USB_OTG_HACTIVE
setbits_le32(ctrl, UCTRL_PWR_POL);
+#else
+ clrbits_le32(ctrl, UCTRL_PWR_POL);
+#endif
}
int usb_phy_mode(int port)