All of lore.kernel.org
 help / color / mirror / Atom feed
From: balbi@kernel.org (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH linux-next v2 1/4] usb: gadget: udc: atmel: Check fifo configuration values against device tree
Date: Thu, 30 Mar 2017 13:38:34 +0300	[thread overview]
Message-ID: <87fuhvjbh1.fsf@linux.intel.com> (raw)
In-Reply-To: <4b91a4973e19a5b7ac05d5e0f5b4dcc8cffb75cf.1490715349.git.cristian.birsan@microchip.com>


Hi,

cristian.birsan at microchip.com writes:
> From: Cristian Birsan <cristian.birsan@microchip.com>
>
> Check fifo configuration values against device tree values for endpoint fifo
> in auto configuration mode (fifo_mode=0).
>
> Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
> ---
>  drivers/usb/gadget/udc/atmel_usba_udc.c | 24 ++++++++++++++++++++++--
>  1 file changed, 22 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
> index 2035906b..3fd43fb 100644
> --- a/drivers/usb/gadget/udc/atmel_usba_udc.c
> +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
> @@ -2118,14 +2118,34 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
>  			dev_err(&pdev->dev, "of_probe: fifo-size error(%d)\n", ret);
>  			goto err;
>  		}
> -		ep->fifo_size = fifo_mode ? udc->fifo_cfg[i].fifo_size : val;
> +		if (fifo_mode) {
> +			if (val < udc->fifo_cfg[i].fifo_size) {
> +				dev_warn(&pdev->dev,
> +					 "of_probe: fifo-size table value not supported by HW, using DT value\n");

114 characters long. Is this even worth a warning? probably not.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170330/354868fe/attachment-0001.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@kernel.org>
To: cristian.birsan@microchip.com, nicolas.ferre@atmel.com,
	gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: ludovic.desroches@atmel.com,
	alexandre.belloni@free-electrons.com,
	boris.brezillon@free-electrons.com,
	Cristian Birsan <cristian.birsan@microchip.com>
Subject: Re: [PATCH linux-next v2 1/4] usb: gadget: udc: atmel: Check fifo configuration values against device tree
Date: Thu, 30 Mar 2017 13:38:34 +0300	[thread overview]
Message-ID: <87fuhvjbh1.fsf@linux.intel.com> (raw)
In-Reply-To: <4b91a4973e19a5b7ac05d5e0f5b4dcc8cffb75cf.1490715349.git.cristian.birsan@microchip.com>

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


Hi,

cristian.birsan@microchip.com writes:
> From: Cristian Birsan <cristian.birsan@microchip.com>
>
> Check fifo configuration values against device tree values for endpoint fifo
> in auto configuration mode (fifo_mode=0).
>
> Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
> ---
>  drivers/usb/gadget/udc/atmel_usba_udc.c | 24 ++++++++++++++++++++++--
>  1 file changed, 22 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
> index 2035906b..3fd43fb 100644
> --- a/drivers/usb/gadget/udc/atmel_usba_udc.c
> +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
> @@ -2118,14 +2118,34 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
>  			dev_err(&pdev->dev, "of_probe: fifo-size error(%d)\n", ret);
>  			goto err;
>  		}
> -		ep->fifo_size = fifo_mode ? udc->fifo_cfg[i].fifo_size : val;
> +		if (fifo_mode) {
> +			if (val < udc->fifo_cfg[i].fifo_size) {
> +				dev_warn(&pdev->dev,
> +					 "of_probe: fifo-size table value not supported by HW, using DT value\n");

114 characters long. Is this even worth a warning? probably not.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2017-03-30 10:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 16:07 [PATCH linux-next v2 0/4] usb: gadget: udc: atmel: Endpoint allocation scheme fixes cristian.birsan at microchip.com
2017-03-28 16:07 ` cristian.birsan
2017-03-28 16:07 ` [PATCH linux-next v2 1/4] usb: gadget: udc: atmel: Check fifo configuration values against device tree cristian.birsan at microchip.com
2017-03-28 16:07   ` cristian.birsan
2017-03-30 10:38   ` Felipe Balbi [this message]
2017-03-30 10:38     ` Felipe Balbi
2017-03-28 16:07 ` [PATCH linux-next v2 2/4] usb: gadget: udc: atmel: Minor code cleanup cristian.birsan at microchip.com
2017-03-28 16:07   ` cristian.birsan
2017-03-28 16:07 ` [PATCH linux-next v2 3/4] usb: gadget: udc: atmel: Use dev_warn() to display EP configuration error cristian.birsan at microchip.com
2017-03-28 16:07   ` cristian.birsan
2017-03-30 10:39   ` Felipe Balbi
2017-03-30 10:39     ` Felipe Balbi
2017-03-28 16:07 ` [PATCH linux-next v2 4/4] usb: gadget: udc: atmel: Update Kconfig help for fifo_mode = 0 cristian.birsan at microchip.com
2017-03-28 16:07   ` cristian.birsan
2017-03-29  8:38 ` [PATCH linux-next v2 0/4] usb: gadget: udc: atmel: Endpoint allocation scheme fixes Nicolas Ferre
2017-03-29  8:38   ` Nicolas Ferre

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=87fuhvjbh1.fsf@linux.intel.com \
    --to=balbi@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.