public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@linux.intel.com>
To: Rajesh Bhagat <rajesh.bhagat@nxp.com>, linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
	leoyang.li@nxp.com, sriram.dash@nxp.com,
	Rajesh Bhagat <rajesh.bhagat@nxp.com>
Subject: Re: [PATCH] drivers: usb: dwc3 : Configure DMA properties and ops from DT
Date: Wed, 04 May 2016 10:57:42 +0300	[thread overview]
Message-ID: <874maefe6h.fsf@intel.com> (raw)
In-Reply-To: <1462333318-29772-1-git-send-email-rajesh.bhagat@nxp.com>

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


Hi,

Rajesh Bhagat <rajesh.bhagat@nxp.com> writes:
> On certain platforms (e.g. ARM64) the dma_ops needs to be explicitly set
> to be able to do DMA allocations, so use the of_dma_configure() helper
> to populate the dma properties and assign an appropriate dma_ops.
>
> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
> Reviewed-by: Yang-Leo Li <leoyang.li@nxp.com>

Cool, nxp is also using dwc3 :-) C'mon Rajesh, send us a glue layer :)

> diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
> index c679f63..4d5b783 100644
> --- a/drivers/usb/dwc3/host.c
> +++ b/drivers/usb/dwc3/host.c
> @@ -17,6 +17,7 @@
>  
>  #include <linux/platform_device.h>
>  #include <linux/usb/xhci_pdriver.h>
> +#include <linux/of_device.h>
>  
>  #include "core.h"
>  
> @@ -32,6 +33,9 @@ int dwc3_host_init(struct dwc3 *dwc)
>  		return -ENOMEM;
>  	}
>  
> +	if (IS_ENABLED(CONFIG_OF) && dwc->dev->of_node)
> +		of_dma_configure(&xhci->dev, dwc->dev->of_node);

okay, so we have a long discussion about this going on. You can catch up
with it starting here:

http://marc.info/?i=1461612094-30939-1-git-send-email-grygorii.strashko@ti.com

At least for now, this patch will be applied. We need to have a better
solution for this, one that helps not only DT platforms.

-- 
balbi

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

  reply	other threads:[~2016-05-04  7:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04  3:41 [PATCH] drivers: usb: dwc3 : Configure DMA properties and ops from DT Rajesh Bhagat
2016-05-04  7:57 ` Felipe Balbi [this message]
2016-05-11  3:45   ` Rajesh Bhagat
2016-05-25 19:31   ` Leo Li
2016-05-26  8:30     ` Felipe Balbi
2016-05-26 20:56       ` Leo Li
2016-05-27 13:32         ` Felipe Balbi

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=874maefe6h.fsf@intel.com \
    --to=felipe.balbi@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rajesh.bhagat@nxp.com \
    --cc=sriram.dash@nxp.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