2015-11-06 06:04:30

by Andy Gross

[permalink] [raw]
Subject: [PATCH 0/2] 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(-)

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation


2015-11-06 06:04:31

by Andy Gross

[permalink] [raw]
Subject: [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.

Signed-off-by: Andy Gross <[email protected]>
---
drivers/usb/chipidea/ci_hdrc_msm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c
index d79ecc0..3889809 100644
--- a/drivers/usb/chipidea/ci_hdrc_msm.c
+++ b/drivers/usb/chipidea/ci_hdrc_msm.c
@@ -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:
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

2015-11-06 06:04:56

by Andy Gross

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

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

Signed-off-by: Andy Gross <[email protected]>
---
drivers/usb/host/ehci-msm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index c4f84c8..c23e285 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -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);

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

2015-11-06 08:26:40

by Peter Chen

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

On Fri, Nov 06, 2015 at 12:04:06AM -0600, Andy Gross wrote:
> This patch sets the AHBMODE to allow for posted data writes. This
> results in higher performance.
>
> Signed-off-by: Andy Gross <[email protected]>
> ---
> drivers/usb/chipidea/ci_hdrc_msm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c
> index d79ecc0..3889809 100644
> --- a/drivers/usb/chipidea/ci_hdrc_msm.c
> +++ b/drivers/usb/chipidea/ci_hdrc_msm.c
> @@ -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:
> --
> 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.

Acked-by: Peter Chen <[email protected]>

--

Best Regards,
Peter Chen

2015-11-06 10:13:22

by Georgi Djakov

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

On 11/06/2015 08:04 AM, Andy Gross wrote:
> This patch sets the AHBMODE to allow for posted data writes. This
> results in higher performance.
>
> Signed-off-by: Andy Gross <[email protected]>

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

Tested-by: Georgi Djakov <[email protected]>

> ---
> drivers/usb/host/ehci-msm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
> index c4f84c8..c23e285 100644
> --- a/drivers/usb/host/ehci-msm.c
> +++ b/drivers/usb/host/ehci-msm.c
> @@ -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);
>
>

2015-11-06 15:41:10

by Alan Stern

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

On Fri, 6 Nov 2015, Georgi Djakov wrote:

> On 11/06/2015 08:04 AM, Andy Gross wrote:
> > This patch sets the AHBMODE to allow for posted data writes. This
> > results in higher performance.
> >
> > Signed-off-by: Andy Gross <[email protected]>
>
> With these patches I see significant improvement in throughput
> on my db410c board.
>
> Tested-by: Georgi Djakov <[email protected]>
>
> > ---
> > drivers/usb/host/ehci-msm.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
> > index c4f84c8..c23e285 100644
> > --- a/drivers/usb/host/ehci-msm.c
> > +++ b/drivers/usb/host/ehci-msm.c
> > @@ -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);

Acked-by: Alan Stern <[email protected]>

2015-12-10 17:51:52

by Timur Tabi

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

On Fri, Nov 6, 2015 at 12:04 AM, Andy Gross <[email protected]> wrote:
> This patch sets the AHBMODE to allow for posted data writes. This
> results in higher performance.
>
> Signed-off-by: Andy Gross <[email protected]>

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

Acked-by: Timur Tabi <[email protected]>

--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.