[U-Boot] [PATCH 05/13] ehci-mx5: Fix OPM usage

Benoît Thébaudeau benoit.thebaudeau at advansee.com
Mon Nov 5 21:11:15 CET 2012


MXC_OTG_UCTRL_OPM_BIT disables (masks) the power/oc pins if set, like
MXC_H1_UCTRL_H1PM_BIT and MXC_H2_UCTRL_H2PM_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                                    |    4 ++--
 1 file changed, 2 insertions(+), 2 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 1248671..bd1f119 100644
--- u-boot-usb-76454b2.orig/drivers/usb/host/ehci-mx5.c
+++ u-boot-usb-76454b2/drivers/usb/host/ehci-mx5.c
@@ -154,9 +154,9 @@ int mxc_set_usbcontrol(int port, unsigned int flags)
 
 			v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET);
 			if (flags & MXC_EHCI_POWER_PINS_ENABLED)
-				v |= MXC_OTG_UCTRL_OPM_BIT;
-			else
 				v &= ~MXC_OTG_UCTRL_OPM_BIT;
+			else
+				v |= MXC_OTG_UCTRL_OPM_BIT;
 			__raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
 		}
 		break;


More information about the U-Boot mailing list