public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Nikhil Badola <nikhil.badola@freescale.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>,
	<linux-omap@vger.kernel.org>, <balbi@ti.com>,
	<gregkh@linuxfoundation.org>
Subject: Re: [PATCH 2/3][v3] drivers: usb: dwc3: Add frame length adjustment quirk
Date: Thu, 3 Sep 2015 10:55:21 -0500	[thread overview]
Message-ID: <20150903155521.GD4031@saruman.tx.rr.com> (raw)
In-Reply-To: <1441260244-27279-1-git-send-email-nikhil.badola@freescale.com>

[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]

On Thu, Sep 03, 2015 at 11:34:04AM +0530, Nikhil Badola wrote:
> Add adjust_frame_length_quirk for writing to fladj register
> which adjusts (micro)frame length to value provided by
> "snps,quirk-frame-length-adjustment" property thus avoiding
> USB 2.0 devices to time-out over a longer run
> 
> Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
> ---
> Changes for v3:
> 	- removed unnecessary if(fladj) condition
> 	- removed stray newline
> 
>  drivers/usb/dwc3/core.c          | 34 ++++++++++++++++++++++++++++++++++
>  drivers/usb/dwc3/core.h          |  5 +++++
>  drivers/usb/dwc3/platform_data.h |  2 ++
>  3 files changed, 41 insertions(+)
> 
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 064123e..75a17bf 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -143,6 +143,32 @@ static int dwc3_soft_reset(struct dwc3 *dwc)
>  	return 0;
>  }
>  
> +/*
> + * dwc3_frame_length_adjustment - Adjusts frame length if required
> + * @dwc3: Pointer to our controller context structure
> + * @fladj: Value of GFLADJ_30MHZ to adjust frame length
> + */
> +static void dwc3_frame_length_adjustment(struct dwc3 *dwc, u32 fladj)
> +{
> +	if (dwc->revision < DWC3_REVISION_250A)
> +		return;
> +
> +	if (fladj == 0)
> +		return;
> +
> +	u32 reg;
> +	u32 dft;

are you seriously telling me that GCC didn't warn you about mixing
declaration and code ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-09-03 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03  6:04 [PATCH 2/3][v3] drivers: usb: dwc3: Add frame length adjustment quirk Nikhil Badola
2015-09-03 15:55 ` Felipe Balbi [this message]
2015-09-03 17:28   ` Badola Nikhil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150903155521.GD4031@saruman.tx.rr.com \
    --to=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nikhil.badola@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox