Patchwork [U-Boot,v3,05/13] ehci-mx5: Fix OPM usage

login
register
mail settings
Submitter Benoît Thébaudeau
Date Nov. 13, 2012, 7:56 p.m.
Message ID <180923884.1238923.1352836604731.JavaMail.root@advansee.com>
Download mbox | patch
Permalink /patch/198764/
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Comments

Benoît Thébaudeau - Nov. 13, 2012, 7:56 p.m.
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@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
---
Changes for v2: None.
Changes for v3: None.

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

Patch

diff --git u-boot-usb-76454b2.orig/drivers/usb/host/ehci-mx5.c u-boot-usb-76454b2/drivers/usb/host/ehci-mx5.c
index 72cde1a..8c1b70a 100644
--- u-boot-usb-76454b2.orig/drivers/usb/host/ehci-mx5.c
+++ u-boot-usb-76454b2/drivers/usb/host/ehci-mx5.c
@@ -161,9 +161,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;