]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ehci-mx5: Fix OPM usage
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
Tue, 13 Nov 2012 09:56:44 +0000 (09:56 +0000)
committerStefano Babic <sbabic@denx.de>
Fri, 16 Nov 2012 08:16:44 +0000 (09:16 +0100)
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>
drivers/usb/host/ehci-mx5.c

index 72cde1a92ad1e090c0621a0dc0246c38cdd7b768..8c1b70a87a45a67f30f60b462a2e857415b82870 100644 (file)
@@ -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;