aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>2012-06-28 10:59:46 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2012-07-09 04:32:44 -0400
commit0b87c1d4be230d109effe8aef78728160800e67f (patch)
treeb07cde880da573e69e3bedecd0de9b0471026273
parent5cfe82c674c77c21274769643c0b92dd7bb4cb05 (diff)
ARM: imx: fix mx51 ehci setup errors
This patch completes commit 08406f5 by fixing the following issues, according to the reference manual: * MXC_OTG_UCTRL_OPM_BIT disables (masks) the power/oc pins if set, like H1PM and H2PM, not the opposite. * MXC_OTG_PHYCTRL_OC_DIS_BIT disables the oc pin if set, like H1_OC_DIS, not the opposite. * Typos in comments. Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> Cc: <linux-arm-kernel@lists.infradead.org> Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-imx/ehci-imx5.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/mach-imx/ehci-imx5.c b/arch/arm/mach-imx/ehci-imx5.c
index 49e3b342758a..a6a4afb0ad62 100644
--- a/arch/arm/mach-imx/ehci-imx5.c
+++ b/arch/arm/mach-imx/ehci-imx5.c
@@ -88,11 +88,11 @@ int mx51_initialize_usb_hw(int port, unsigned int flags)
88 else 88 else
89 v &= ~MXC_OTG_PHYCTRL_OC_POL_BIT; 89 v &= ~MXC_OTG_PHYCTRL_OC_POL_BIT;
90 if (flags & MXC_EHCI_POWER_PINS_ENABLED) { 90 if (flags & MXC_EHCI_POWER_PINS_ENABLED) {
91 /* OC/USBPWR is not used */
92 v |= MXC_OTG_PHYCTRL_OC_DIS_BIT;
93 } else {
94 /* OC/USBPWR is used */ 91 /* OC/USBPWR is used */
95 v &= ~MXC_OTG_PHYCTRL_OC_DIS_BIT; 92 v &= ~MXC_OTG_PHYCTRL_OC_DIS_BIT;
93 } else {
94 /* OC/USBPWR is not used */
95 v |= MXC_OTG_PHYCTRL_OC_DIS_BIT;
96 } 96 }
97 if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH) 97 if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH)
98 v |= MXC_OTG_PHYCTRL_PWR_POL_BIT; 98 v |= MXC_OTG_PHYCTRL_PWR_POL_BIT;
@@ -106,9 +106,9 @@ int mx51_initialize_usb_hw(int port, unsigned int flags)
106 else 106 else
107 v &= ~MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup disable */ 107 v &= ~MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup disable */
108 if (flags & MXC_EHCI_POWER_PINS_ENABLED) 108 if (flags & MXC_EHCI_POWER_PINS_ENABLED)
109 v |= MXC_OTG_UCTRL_OPM_BIT;
110 else
111 v &= ~MXC_OTG_UCTRL_OPM_BIT; 109 v &= ~MXC_OTG_UCTRL_OPM_BIT;
110 else
111 v |= MXC_OTG_UCTRL_OPM_BIT;
112 __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET); 112 __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
113 } 113 }
114 break; 114 break;
@@ -124,7 +124,7 @@ int mx51_initialize_usb_hw(int port, unsigned int flags)
124 } 124 }
125 125
126 if (flags & MXC_EHCI_POWER_PINS_ENABLED) 126 if (flags & MXC_EHCI_POWER_PINS_ENABLED)
127 v &= ~MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/ 127 v &= ~MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask unused*/
128 else 128 else
129 v |= MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/ 129 v |= MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/
130 __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET); 130 __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
@@ -157,7 +157,7 @@ int mx51_initialize_usb_hw(int port, unsigned int flags)
157 } 157 }
158 158
159 if (flags & MXC_EHCI_POWER_PINS_ENABLED) 159 if (flags & MXC_EHCI_POWER_PINS_ENABLED)
160 v &= ~MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask used*/ 160 v &= ~MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask unused*/
161 else 161 else
162 v |= MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask used*/ 162 v |= MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask used*/
163 __raw_writel(v, usbother_base + MXC_USBH2CTRL_OFFSET); 163 __raw_writel(v, usbother_base + MXC_USBH2CTRL_OFFSET);