diff options
author | Ramneek Mehresh <ramneek.mehresh@freescale.com> | 2013-09-16 05:41:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-26 14:59:57 -0400 |
commit | ad1260e9fbf768d6bed227d9604ebee76a84aae3 (patch) | |
tree | 18655a6182c91ee11dfb1ead04838151e2118c43 /drivers/usb | |
parent | 831abf76643555a99b80a3b54adfa7e4fa0a3259 (diff) |
fsl/usb: Resolve PHY_CLK_VLD instability issue for ULPI phy
For controller versions greater than 1.6, setting ULPI_PHY_CLK_SEL
bit when USB_EN bit is already set causes instability issues with
PHY_CLK_VLD bit. So USB_EN is set only for IP controller version
below 1.6 before setting ULPI_PHY_CLK_SEL bit
Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-fsl.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 4449f565d6c6..d3166e693dcb 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
@@ -130,7 +130,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, | |||
130 | } | 130 | } |
131 | 131 | ||
132 | /* Enable USB controller, 83xx or 8536 */ | 132 | /* Enable USB controller, 83xx or 8536 */ |
133 | if (pdata->have_sysif_regs) | 133 | if (pdata->have_sysif_regs && pdata->controller_ver < FSL_USB_VER_1_6) |
134 | setbits32(hcd->regs + FSL_SOC_USB_CTRL, 0x4); | 134 | setbits32(hcd->regs + FSL_SOC_USB_CTRL, 0x4); |
135 | 135 | ||
136 | /* Don't need to set host mode here. It will be done by tdi_reset() */ | 136 | /* Don't need to set host mode here. It will be done by tdi_reset() */ |
@@ -232,15 +232,9 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd, | |||
232 | case FSL_USB2_PHY_ULPI: | 232 | case FSL_USB2_PHY_ULPI: |
233 | if (pdata->have_sysif_regs && pdata->controller_ver) { | 233 | if (pdata->have_sysif_regs && pdata->controller_ver) { |
234 | /* controller version 1.6 or above */ | 234 | /* controller version 1.6 or above */ |
235 | clrbits32(non_ehci + FSL_SOC_USB_CTRL, UTMI_PHY_EN); | ||
235 | setbits32(non_ehci + FSL_SOC_USB_CTRL, | 236 | setbits32(non_ehci + FSL_SOC_USB_CTRL, |
236 | ULPI_PHY_CLK_SEL); | 237 | ULPI_PHY_CLK_SEL | USB_CTRL_USB_EN); |
237 | /* | ||
238 | * Due to controller issue of PHY_CLK_VALID in ULPI | ||
239 | * mode, we set USB_CTRL_USB_EN before checking | ||
240 | * PHY_CLK_VALID, otherwise PHY_CLK_VALID doesn't work. | ||
241 | */ | ||
242 | clrsetbits_be32(non_ehci + FSL_SOC_USB_CTRL, | ||
243 | UTMI_PHY_EN, USB_CTRL_USB_EN); | ||
244 | } | 238 | } |
245 | portsc |= PORT_PTS_ULPI; | 239 | portsc |= PORT_PTS_ULPI; |
246 | break; | 240 | break; |