[U-Boot] [PATCH v3 04/13] ehci-mx5: Fix OC_DIS usage

Benoît Thébaudeau benoit.thebaudeau at advansee.com
Tue Nov 13 20:56:30 CET 2012


MXC_OTG_PHYCTRL_OC_DIS_BIT disables the oc pin if set, like MXC_H1_OC_DIS_BIT,
not the opposite.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau at advansee.com>
Cc: Marek Vasut <marex at denx.de>
Cc: Stefano Babic <sbabic at denx.de>
---
Changes for v2: None.
Changes for v3: None.

 .../drivers/usb/host/ehci-mx5.c                                  |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git u-boot-usb-76454b2.orig/drivers/usb/host/ehci-mx5.c u-boot-usb-76454b2/drivers/usb/host/ehci-mx5.c
index 46973b0..72cde1a 100644
--- u-boot-usb-76454b2.orig/drivers/usb/host/ehci-mx5.c
+++ u-boot-usb-76454b2/drivers/usb/host/ehci-mx5.c
@@ -151,11 +151,11 @@ int mxc_set_usbcontrol(int port, unsigned int flags)
 			v = __raw_readl(usbother_base +
 					MXC_USB_PHY_CTR_FUNC_OFFSET);
 			if (flags & MXC_EHCI_POWER_PINS_ENABLED)
-				/* OC/USBPWR is not used */
-				v |= MXC_OTG_PHYCTRL_OC_DIS_BIT;
-			else
 				/* OC/USBPWR is used */
 				v &= ~MXC_OTG_PHYCTRL_OC_DIS_BIT;
+			else
+				/* OC/USBPWR is not used */
+				v |= MXC_OTG_PHYCTRL_OC_DIS_BIT;
 			__raw_writel(v, usbother_base +
 					MXC_USB_PHY_CTR_FUNC_OFFSET);
 


More information about the U-Boot mailing list