Skip to contentSkip to conversation

usb: ehci-fsl: set INCR8 mode only on MPC512x

PATCH In review Tiejun Chen 2 participants 4 messages Apr 24, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: ehci-fsl: set INCR8 mode only on MPC512x

commit 761bbcb7, "usb: ehci-fsl: set INCR8 mode for system bus interface on MPC512x", introduced to fix one MPC5121e (M36P) Errata by setting INCR8 mode for system bus interface on MPC512x, but we should make sure this is only valid for MPC512x like other parts of this commit. Otherwise this would issue other platforms as abnormal without this similar Errata.

---
 drivers/usb/host/ehci-fsl.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/usb/host/ehci-fsl.c +9 -1
index d81d2fc..f4f2a7b 100644
@@ -509,7 +509,15 @@ static int ehci_fsl_mpc512x_drv_resume(struct device *dev)
 	ehci_writel(ehci, ISIPHYCTRL_PXE | ISIPHYCTRL_PHYE,
 		    hcd->regs + FSL_SOC_USB_ISIPHYCTRL);
 
-	ehci_writel(ehci, SBUSCFG_INCR8, hcd->regs + FSL_SOC_USB_SBUSCFG);
+	if (of_device_is_compatible(dev->parent->of_node,
+				    "fsl,mpc5121-usb2-dr")) {
+		/*
+		 * set SBUSCFG:AHBBRST so that control msgs don't
+		 * fail when doing heavy PATA writes.
+		 */
+		ehci_writel(ehci, SBUSCFG_INCR8,
+			    hcd->regs + FSL_SOC_USB_SBUSCFG);
+	}
 
 	/* restore EHCI registers */
 	ehci_writel(ehci, pdata->pm_command, &ehci->regs->command);
Signature · 1 line
1.7.9.5
#1 lore raw

Sorry, please ignore this temporarily since looks this is already covered in tree.

I will look further into this to send another version.

Tiejun

Quoted 33 lines · Tiejun Chen

commit 761bbcb7, "usb: ehci-fsl: set INCR8 mode for system bus interface on MPC512x", introduced to fix one MPC5121e (M36P) Errata by setting INCR8 mode for system bus interface on MPC512x, but we should make sure this is only valid for MPC512x like other parts of this commit. Otherwise this would issue other platforms as abnormal without this similar Errata.

---
  drivers/usb/host/ehci-fsl.c |   10 +++++++++-
  1 file changed, 9 insertions(+), 1 deletion(-)
drivers/usb/host/ehci-fsl.c +9 -1
index d81d2fc..f4f2a7b 100644
@@ -509,7 +509,15 @@ static int ehci_fsl_mpc512x_drv_resume(struct device *dev)
  	ehci_writel(ehci, ISIPHYCTRL_PXE | ISIPHYCTRL_PHYE,
  		    hcd->regs + FSL_SOC_USB_ISIPHYCTRL);
 
-	ehci_writel(ehci, SBUSCFG_INCR8, hcd->regs + FSL_SOC_USB_SBUSCFG);
+	if (of_device_is_compatible(dev->parent->of_node,
+				    "fsl,mpc5121-usb2-dr")) {
+		/*
+		 * set SBUSCFG:AHBBRST so that control msgs don't
+		 * fail when doing heavy PATA writes.
+		 */
+		ehci_writel(ehci, SBUSCFG_INCR8,
+			    hcd->regs + FSL_SOC_USB_SBUSCFG);
+	}
 
  	/* restore EHCI registers */
  	ehci_writel(ehci, pdata->pm_command, &ehci->regs->command);
#2 lore raw
In reply to Tiejun Chen
Quoted 4 lines · On Wed, 24 Apr 2013 10:55:10 +0800 Tiejun Chen <[email protected]>…

commit 761bbcb7, "usb: ehci-fsl: set INCR8 mode for system bus interface on MPC512x", introduced to fix one MPC5121e (M36P) Errata by setting INCR8 mode for system bus interface on MPC512x, but we should make sure this is only valid for MPC512x like other parts of this commit. Otherwise

NAK. It is already only valid for MPC512x.

Quoted 1 line

this would issue other platforms as abnormal without this similar Errata.

This setting is in the ehci_fsl_mpc512x_drv_resume() function which is not called on other platforms.

Thanks,

Anatolij

#3 lore raw
Quoted 8 lines · Anatolij Gustschin
Quoted 4 lines · On Wed, 24 Apr 2013 10:55:10 +0800 Tiejun Chen <[email protected]>…

commit 761bbcb7, "usb: ehci-fsl: set INCR8 mode for system bus interface on MPC512x", introduced to fix one MPC5121e (M36P) Errata by setting INCR8 mode for system bus interface on MPC512x, but we should make sure this is only valid for MPC512x like other parts of this commit. Otherwise

Quoted 6 lines

NAK. It is already only valid for MPC512x.

Quoted 1 line

this would issue other platforms as abnormal without this similar Errata.

This setting is in the ehci_fsl_mpc512x_drv_resume() function which is not called on other platforms.

Yes, I already notice this and also send a notification to ignore this improper patch immediately ;-)

Thanks,

Tiejun