aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-29 19:49:21 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-29 19:49:21 -0500
commitf7c96f59b4af72f51c7835ed073da820bc3786b3 (patch)
tree28bcfb3ecd9a913d39ec1ffb407490fc7b5296e0 /drivers/usb/host
parentaac1fc386fa13f9f450909fcfb02e73db55f0c0f (diff)
Revert "powerpc/usb: fix usb CTRL_PHY_CLK_VALID breaks on some platform"
This reverts commit 79857e8e7b1ba740f8025b540f1e171c9a0a5d31. To quote Shengzhou Liu: I'm sorry, please don't apply this patch. It appears not only on P1022 platform. There will be more breaks on other platforms regarding CTRL_PHY_CLK_VALID bit. I will post a new patch with well compatibility on all platforms as soon as I get necessary confirmations. Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-fsl.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index e9d8a0cca47b..7a15c2235758 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -248,11 +248,7 @@ static int ehci_fsl_usb_setup(struct ehci_hcd *ehci)
248 struct usb_hcd *hcd = ehci_to_hcd(ehci); 248 struct usb_hcd *hcd = ehci_to_hcd(ehci);
249 struct fsl_usb2_platform_data *pdata; 249 struct fsl_usb2_platform_data *pdata;
250 void __iomem *non_ehci = hcd->regs; 250 void __iomem *non_ehci = hcd->regs;
251 u32 temp, chip, rev, svr; 251 u32 temp;
252
253 svr = mfspr(SPRN_SVR);
254 chip = svr >> 16;
255 rev = (svr >> 4) & 0xf;
256 252
257 pdata = hcd->self.controller->platform_data; 253 pdata = hcd->self.controller->platform_data;
258 254
@@ -278,6 +274,12 @@ static int ehci_fsl_usb_setup(struct ehci_hcd *ehci)
278 ehci_fsl_setup_phy(ehci, pdata->phy_mode, 0); 274 ehci_fsl_setup_phy(ehci, pdata->phy_mode, 0);
279 275
280 if (pdata->operating_mode == FSL_USB2_MPH_HOST) { 276 if (pdata->operating_mode == FSL_USB2_MPH_HOST) {
277 unsigned int chip, rev, svr;
278
279 svr = mfspr(SPRN_SVR);
280 chip = svr >> 16;
281 rev = (svr >> 4) & 0xf;
282
281 /* Deal with USB Erratum #14 on MPC834x Rev 1.0 & 1.1 chips */ 283 /* Deal with USB Erratum #14 on MPC834x Rev 1.0 & 1.1 chips */
282 if ((rev == 1) && (chip >= 0x8050) && (chip <= 0x8055)) 284 if ((rev == 1) && (chip >= 0x8050) && (chip <= 0x8055))
283 ehci->has_fsl_port_bug = 1; 285 ehci->has_fsl_port_bug = 1;
@@ -299,15 +301,9 @@ static int ehci_fsl_usb_setup(struct ehci_hcd *ehci)
299 out_be32(non_ehci + FSL_SOC_USB_SICTRL, 0x00000001); 301 out_be32(non_ehci + FSL_SOC_USB_SICTRL, 0x00000001);
300 } 302 }
301 303
302 /* There is no CTRL_PHY_CLK_VALID bit on some platforms, e.g. P1022 */ 304 if (!(in_be32(non_ehci + FSL_SOC_USB_CTRL) & CTRL_PHY_CLK_VALID)) {
303#define SVR_P1022_N_ID 0x80E6 305 printk(KERN_WARNING "fsl-ehci: USB PHY clock invalid\n");
304#define SVR_P1022_S_ID 0x80EE 306 return -ENODEV;
305 if (chip != SVR_P1022_N_ID && chip != SVR_P1022_S_ID) {
306 if (!(in_be32(non_ehci + FSL_SOC_USB_CTRL) &
307 CTRL_PHY_CLK_VALID)) {
308 printk(KERN_WARNING "fsl-ehci: USB PHY clock invalid\n");
309 return -ENODEV;
310 }
311 } 307 }
312 return 0; 308 return 0;
313} 309}