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

Benoît Thébaudeau benoit.thebaudeau at advansee.com
Mon Nov 5 21:10:53 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>
---
 .../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 66ab25d..1248671 100644
--- u-boot-usb-76454b2.orig/drivers/usb/host/ehci-mx5.c
+++ u-boot-usb-76454b2/drivers/usb/host/ehci-mx5.c
@@ -144,11 +144,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