aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-fsl.c
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2012-01-24 16:17:38 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-24 18:04:01 -0500
commit761bbcb74e4611414937ea480ba60bb970648755 (patch)
tree36d2c1ef203e68ef6b9b344cabca6b0595388286 /drivers/usb/host/ehci-fsl.c
parent820c629a595ad8d8f2694641e494738b18d29e7b (diff)
usb: ehci-fsl: set INCR8 mode for system bus interface on MPC512x
Use INCR8 mode for system bus interface of the USB controller on MPC512x. This is a work-around for the AHB bus lock up problem observed on MPC512x when there is heavy simultaneous PATA write or network (FEC) activity. See also "12.4 The USB controller can issue transactions that lock up the AHB bus under certain conditions" in MPC5121e (M36P) Errata. Signed-off-by: Anatolij Gustschin <agust@denx.de> Tested-by: Matthias Fuchs <matthias.fuchs@esd.ue> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-fsl.c')
-rw-r--r--drivers/usb/host/ehci-fsl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index e90344a17631..42414cd73571 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -316,7 +316,9 @@ static int ehci_fsl_setup(struct usb_hcd *hcd)
316 struct ehci_hcd *ehci = hcd_to_ehci(hcd); 316 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
317 int retval; 317 int retval;
318 struct fsl_usb2_platform_data *pdata; 318 struct fsl_usb2_platform_data *pdata;
319 struct device *dev;
319 320
321 dev = hcd->self.controller;
320 pdata = hcd->self.controller->platform_data; 322 pdata = hcd->self.controller->platform_data;
321 ehci->big_endian_desc = pdata->big_endian_desc; 323 ehci->big_endian_desc = pdata->big_endian_desc;
322 ehci->big_endian_mmio = pdata->big_endian_mmio; 324 ehci->big_endian_mmio = pdata->big_endian_mmio;
@@ -346,6 +348,16 @@ static int ehci_fsl_setup(struct usb_hcd *hcd)
346 348
347 ehci_reset(ehci); 349 ehci_reset(ehci);
348 350
351 if (of_device_is_compatible(dev->parent->of_node,
352 "fsl,mpc5121-usb2-dr")) {
353 /*
354 * set SBUSCFG:AHBBRST so that control msgs don't
355 * fail when doing heavy PATA writes.
356 */
357 ehci_writel(ehci, SBUSCFG_INCR8,
358 hcd->regs + FSL_SOC_USB_SBUSCFG);
359 }
360
349 retval = ehci_fsl_reinit(ehci); 361 retval = ehci_fsl_reinit(ehci);
350 return retval; 362 return retval;
351} 363}
@@ -469,6 +481,8 @@ static int ehci_fsl_mpc512x_drv_resume(struct device *dev)
469 ehci_writel(ehci, ISIPHYCTRL_PXE | ISIPHYCTRL_PHYE, 481 ehci_writel(ehci, ISIPHYCTRL_PXE | ISIPHYCTRL_PHYE,
470 hcd->regs + FSL_SOC_USB_ISIPHYCTRL); 482 hcd->regs + FSL_SOC_USB_ISIPHYCTRL);
471 483
484 ehci_writel(ehci, SBUSCFG_INCR8, hcd->regs + FSL_SOC_USB_SBUSCFG);
485
472 /* restore EHCI registers */ 486 /* restore EHCI registers */
473 ehci_writel(ehci, pdata->pm_command, &ehci->regs->command); 487 ehci_writel(ehci, pdata->pm_command, &ehci->regs->command);
474 ehci_writel(ehci, pdata->pm_intr_enable, &ehci->regs->intr_enable); 488 ehci_writel(ehci, pdata->pm_intr_enable, &ehci->regs->intr_enable);