Skip to contentSkip to conversation

Configure AHB to post data transfers

PATCH In review Andy Gross 5 participants 7 messages Nov 6, 2015 – Dec 10, 2015

Subsystems (4)
lore
Share & tools
lore

Andy Gross

author
#0 lore raw

cover Configure AHB to post data transfers

This patch configures the ChipIdea USB 2.0 controller found on Qualcomm platforms to post data transfers on the AHB bus. This yields approximately a 50% increase in performance.

Andy Gross (2):
usb: chipidea: msm: Use posted data writes on AHB
usb: host: ehci-msm: Use posted data writes on AHB

 drivers/usb/chipidea/ci_hdrc_msm.c |    3 ++-
 drivers/usb/host/ehci-msm.c        |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
author
#1 lore raw

PATCH 1/2 usb: chipidea: msm: Use posted data writes on AHB

This patch sets the AHBMODE to allow for posted data writes. This results in higher performance.

---
 drivers/usb/chipidea/ci_hdrc_msm.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/chipidea/ci_hdrc_msm.c +2 -1
index d79ecc0..3889809 100644
@@ -25,7 +25,8 @@ static void ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event)
 	case CI_HDRC_CONTROLLER_RESET_EVENT:
 		dev_dbg(dev, "CI_HDRC_CONTROLLER_RESET_EVENT received\n");
 		writel(0, USB_AHBBURST);
-		writel(0, USB_AHBMODE);
+		/* use AHB transactor, allow posted data writes */
+		writel(0x8, USB_AHBMODE);
 		usb_phy_init(ci->usb_phy);
 		break;
 	case CI_HDRC_CONTROLLER_STOPPED_EVENT:
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] usb: chipidea: msm: Use posted data writes on AHB

Quoted 26 lines · Andy Gross

This patch sets the AHBMODE to allow for posted data writes. This results in higher performance.

---
 drivers/usb/chipidea/ci_hdrc_msm.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/chipidea/ci_hdrc_msm.c +2 -1
index d79ecc0..3889809 100644
@@ -25,7 +25,8 @@ static void ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event)
 	case CI_HDRC_CONTROLLER_RESET_EVENT:
 		dev_dbg(dev, "CI_HDRC_CONTROLLER_RESET_EVENT received\n");
 		writel(0, USB_AHBBURST);
-		writel(0, USB_AHBMODE);
+		/* use AHB transactor, allow posted data writes */
+		writel(0x8, USB_AHBMODE);
 		usb_phy_init(ci->usb_phy);
 		break;
 	case CI_HDRC_CONTROLLER_STOPPED_EVENT:
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

Greg, another related changes is at host driver, pick it up directly please, thanks.

Signature · 6 lines
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#3 lore raw

PATCH 2/2 usb: host: ehci-msm: Use posted data writes on AHB

In reply to Andy Gross

This patch sets the AHBMODE to allow for posted data writes. This results in higher performance.

---
 drivers/usb/host/ehci-msm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/ehci-msm.c +2 -2
index c4f84c8..c23e285 100644
@@ -57,8 +57,8 @@ static int ehci_msm_reset(struct usb_hcd *hcd)
 
 	/* bursts of unspecified length. */
 	writel(0, USB_AHBBURST);
-	/* Use the AHB transactor */
-	writel(0, USB_AHBMODE);
+	/* Use the AHB transactor, allow posted data writes */
+	writel(0x8, USB_AHBMODE);
 	/* Disable streaming mode and select host mode */
 	writel(0x13, USB_USBMODE);
 
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
Tested-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] usb: host: ehci-msm: Use posted data writes on AHB

Quoted 4 lines · Andy Gross

This patch sets the AHBMODE to allow for posted data writes. This results in higher performance.

With these patches I see significant improvement in throughput on my db410c board.

Quoted 20 lines
---
 drivers/usb/host/ehci-msm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/ehci-msm.c +2 -2
index c4f84c8..c23e285 100644
@@ -57,8 +57,8 @@ static int ehci_msm_reset(struct usb_hcd *hcd)
 
 	/* bursts of unspecified length. */
 	writel(0, USB_AHBBURST);
-	/* Use the AHB transactor */
-	writel(0, USB_AHBMODE);
+	/* Use the AHB transactor, allow posted data writes */
+	writel(0x8, USB_AHBMODE);
 	/* Disable streaming mode and select host mode */
 	writel(0x13, USB_USBMODE);
 
maintainer Acked-by
#5 lore raw

Re: [PATCH 2/2] usb: host: ehci-msm: Use posted data writes on AHB

Quoted 21 lines · Georgi Djakov
Quoted 4 lines · Andy Gross

This patch sets the AHBMODE to allow for posted data writes. This results in higher performance.

With these patches I see significant improvement in throughput on my db410c board.

Quoted 10 lines
---
 drivers/usb/host/ehci-msm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/ehci-msm.c +0 -0
index c4f84c8..c23e285 100644
@@ -57,8 +57,8 @@ static int ehci_msm_reset(struct usb_hcd *hcd)
 
Quoted 8 lines

drivers/usb/host/ehci-msm.c static int ehci_msm_reset(struct usb_hcd *hcd) · line 63

Quoted 8 lines
drivers/usb/host/ehci-msm.c +2 -2
 	/* bursts of unspecified length. */
 	writel(0, USB_AHBBURST);
-	/* Use the AHB transactor */
-	writel(0, USB_AHBMODE);
+	/* Use the AHB transactor, allow posted data writes */
+	writel(0x8, USB_AHBMODE);
 	/* Disable streaming mode and select host mode */
 	writel(0x13, USB_USBMODE);
Acked-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] usb: host: ehci-msm: Use posted data writes on AHB

In reply to Andy Gross
Quoted 4 lines · Andy Gross

This patch sets the AHBMODE to allow for posted data writes. This results in higher performance.

I know it's a little late, but ...

Signature · 7 lines
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html