aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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}