Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-10-07 Thread Leo Li
On Thu, Sep 22, 2016 at 12:02 AM, Sriram Dash wrote: >>From: Arnd Bergmann [mailto:a...@arndb.de] >>On Wednesday, September 21, 2016 11:43:59 AM CEST Sriram Dash wrote: >>> >From: Arnd Bergmann [mailto:a...@arndb.de] On Wednesday, September >>> >21, 2016 11:06:47 AM CEST

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-10-07 Thread Leo Li
On Thu, Sep 22, 2016 at 12:02 AM, Sriram Dash wrote: >>From: Arnd Bergmann [mailto:a...@arndb.de] >>On Wednesday, September 21, 2016 11:43:59 AM CEST Sriram Dash wrote: >>> >From: Arnd Bergmann [mailto:a...@arndb.de] On Wednesday, September >>> >21, 2016 11:06:47 AM CEST Sriram Dash wrote: >>>

RE: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-22 Thread Sriram Dash
>From: Arnd Bergmann [mailto:a...@arndb.de] >On Wednesday, September 21, 2016 11:43:59 AM CEST Sriram Dash wrote: >> >From: Arnd Bergmann [mailto:a...@arndb.de] On Wednesday, September >> >21, 2016 11:06:47 AM CEST Sriram Dash wrote: >> >>

RE: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-22 Thread Sriram Dash
>From: Arnd Bergmann [mailto:a...@arndb.de] >On Wednesday, September 21, 2016 11:43:59 AM CEST Sriram Dash wrote: >> >From: Arnd Bergmann [mailto:a...@arndb.de] On Wednesday, September >> >21, 2016 11:06:47 AM CEST Sriram Dash wrote: >> >>

RE: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-21 Thread Sriram Dash
>From: Arnd Bergmann [mailto:a...@arndb.de] >On Wednesday, September 21, 2016 11:06:47 AM CEST Sriram Dash wrote: >> >> Hello Arnd, >> >> We tried this patch on NXP platforms (ls2085 and ls1043) which use >> dwc3 controller without any glue layer. On first go, this did not >> work. But after

RE: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-21 Thread Sriram Dash
>From: Arnd Bergmann [mailto:a...@arndb.de] >On Wednesday, September 21, 2016 11:06:47 AM CEST Sriram Dash wrote: >> >> Hello Arnd, >> >> We tried this patch on NXP platforms (ls2085 and ls1043) which use >> dwc3 controller without any glue layer. On first go, this did not >> work. But after

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-21 Thread Arnd Bergmann
On Wednesday, September 21, 2016 11:43:59 AM CEST Sriram Dash wrote: > >From: Arnd Bergmann [mailto:a...@arndb.de] > >On Wednesday, September 21, 2016 11:06:47 AM CEST Sriram Dash wrote: > > == > From

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-21 Thread Arnd Bergmann
On Wednesday, September 21, 2016 11:43:59 AM CEST Sriram Dash wrote: > >From: Arnd Bergmann [mailto:a...@arndb.de] > >On Wednesday, September 21, 2016 11:06:47 AM CEST Sriram Dash wrote: > > == > From

RE: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-21 Thread Sriram Dash
>From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-ow...@vger.kernel.org] >On Wednesday, September 7, 2016 1:24:07 PM CEST Felipe Balbi wrote: >> >> Hi, >> >> Arnd Bergmann writes: >> >> [...] >> >> > Regarding the DMA configuration that you mention in >> >

RE: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-21 Thread Sriram Dash
>From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-ow...@vger.kernel.org] >On Wednesday, September 7, 2016 1:24:07 PM CEST Felipe Balbi wrote: >> >> Hi, >> >> Arnd Bergmann writes: >> >> [...] >> >> > Regarding the DMA configuration that you mention in >> > ci_hdrc_add_device(), I think we

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-21 Thread Arnd Bergmann
On Wednesday, September 21, 2016 11:06:47 AM CEST Sriram Dash wrote: > > Hello Arnd, > > We tried this patch on NXP platforms (ls2085 and ls1043) which use dwc3 > controller without any glue layer. On first go, this did not work. But after > minimal reworks mention snippet below, we are able to

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-21 Thread Arnd Bergmann
On Wednesday, September 21, 2016 11:06:47 AM CEST Sriram Dash wrote: > > Hello Arnd, > > We tried this patch on NXP platforms (ls2085 and ls1043) which use dwc3 > controller without any glue layer. On first go, this did not work. But after > minimal reworks mention snippet below, we are able to

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-14 Thread Arnd Bergmann
On Wednesday, September 14, 2016 5:31:36 PM CEST Lorenzo Pieralisi wrote: > On Wed, Sep 07, 2016 at 01:47:22PM +0300, Felipe Balbi wrote: > > > > Hi, > > > > Robin Murphy writes: > > > On 07/09/16 10:55, Peter Chen wrote: > > > [...] > > >>> Regarding the DMA configuration

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-14 Thread Arnd Bergmann
On Wednesday, September 14, 2016 5:31:36 PM CEST Lorenzo Pieralisi wrote: > On Wed, Sep 07, 2016 at 01:47:22PM +0300, Felipe Balbi wrote: > > > > Hi, > > > > Robin Murphy writes: > > > On 07/09/16 10:55, Peter Chen wrote: > > > [...] > > >>> Regarding the DMA configuration that you mention in

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-14 Thread Lorenzo Pieralisi
On Wed, Sep 07, 2016 at 01:47:22PM +0300, Felipe Balbi wrote: > > Hi, > > Robin Murphy writes: > > On 07/09/16 10:55, Peter Chen wrote: > > [...] > >>> Regarding the DMA configuration that you mention in ci_hdrc_add_device(), > >>> I think we should replace > >>> > >>>

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-14 Thread Lorenzo Pieralisi
On Wed, Sep 07, 2016 at 01:47:22PM +0300, Felipe Balbi wrote: > > Hi, > > Robin Murphy writes: > > On 07/09/16 10:55, Peter Chen wrote: > > [...] > >>> Regarding the DMA configuration that you mention in ci_hdrc_add_device(), > >>> I think we should replace > >>> > >>>

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Peter Chen
On Thu, Sep 08, 2016 at 03:59:19PM +0300, Grygorii Strashko wrote: > On 09/08/2016 03:28 PM, Peter Chen wrote: > > On Thu, Sep 08, 2016 at 12:17:21PM +0200, Arnd Bergmann wrote: > >> On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: > >>> Arnd Bergmann writes: >

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Peter Chen
On Thu, Sep 08, 2016 at 03:59:19PM +0300, Grygorii Strashko wrote: > On 09/08/2016 03:28 PM, Peter Chen wrote: > > On Thu, Sep 08, 2016 at 12:17:21PM +0200, Arnd Bergmann wrote: > >> On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: > >>> Arnd Bergmann writes: > On

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Peter Chen
On Thu, Sep 08, 2016 at 02:52:29PM +0200, Arnd Bergmann wrote: > On Thursday, September 8, 2016 8:28:10 PM CEST Peter Chen wrote: > > On Thu, Sep 08, 2016 at 12:17:21PM +0200, Arnd Bergmann wrote: > > > On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: > > > > Arnd Bergmann

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Peter Chen
On Thu, Sep 08, 2016 at 02:52:29PM +0200, Arnd Bergmann wrote: > On Thursday, September 8, 2016 8:28:10 PM CEST Peter Chen wrote: > > On Thu, Sep 08, 2016 at 12:17:21PM +0200, Arnd Bergmann wrote: > > > On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: > > > > Arnd Bergmann

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Grygorii Strashko
On 09/08/2016 03:28 PM, Peter Chen wrote: > On Thu, Sep 08, 2016 at 12:17:21PM +0200, Arnd Bergmann wrote: >> On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: >>> Arnd Bergmann writes: On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote:

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Grygorii Strashko
On 09/08/2016 03:28 PM, Peter Chen wrote: > On Thu, Sep 08, 2016 at 12:17:21PM +0200, Arnd Bergmann wrote: >> On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: >>> Arnd Bergmann writes: On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote: >> If we do

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 8:28:10 PM CEST Peter Chen wrote: > On Thu, Sep 08, 2016 at 12:17:21PM +0200, Arnd Bergmann wrote: > > On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: > > > Arnd Bergmann writes: > > > > On Thursday, September 8, 2016 11:29:04 AM

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 8:28:10 PM CEST Peter Chen wrote: > On Thu, Sep 08, 2016 at 12:17:21PM +0200, Arnd Bergmann wrote: > > On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: > > > Arnd Bergmann writes: > > > > On Thursday, September 8, 2016 11:29:04 AM CEST Felipe

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 2:52:46 PM CEST Felipe Balbi wrote: > Arnd Bergmann writes: > >> If we make dwc3.ko a library which glue calls directly then all these > >> problems are solved but we break all current DTs and fall into the trap > >> of having another MUSB. > > > > I

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 2:52:46 PM CEST Felipe Balbi wrote: > Arnd Bergmann writes: > >> If we make dwc3.ko a library which glue calls directly then all these > >> problems are solved but we break all current DTs and fall into the trap > >> of having another MUSB. > > > > I don't see how

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Peter Chen
On Thu, Sep 08, 2016 at 12:17:21PM +0200, Arnd Bergmann wrote: > On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: > > Arnd Bergmann writes: > > > On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote: > > >> > If we do that, we have to put child

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Peter Chen
On Thu, Sep 08, 2016 at 12:17:21PM +0200, Arnd Bergmann wrote: > On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: > > Arnd Bergmann writes: > > > On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote: > > >> > If we do that, we have to put child devices of the dwc3

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 3:02:56 PM CEST Grygorii Strashko wrote: > dwc3: probe() > if (!>dev->of_node) > legacy case - hard-code DMA props > dwc->sysdev = >dev; The PCI case will fall into this too, as we almost never have an ->of_node pointer for a

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 3:02:56 PM CEST Grygorii Strashko wrote: > dwc3: probe() > if (!>dev->of_node) > legacy case - hard-code DMA props > dwc->sysdev = >dev; The PCI case will fall into this too, as we almost never have an ->of_node pointer for a

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Grygorii Strashko
On 09/08/2016 02:00 PM, Felipe Balbi wrote: > > Hi, > > Arnd Bergmann writes: >> On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: >>> Arnd Bergmann writes: On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote: >> If we do

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Grygorii Strashko
On 09/08/2016 02:00 PM, Felipe Balbi wrote: > > Hi, > > Arnd Bergmann writes: >> On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: >>> Arnd Bergmann writes: On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote: >> If we do that, we have to put child

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Felipe Balbi
Hi, Arnd Bergmann writes: >> >> But this needs to be done before dwc3_probe() executes. For dwc3-pci >> >> that's easy, but for DT devices, seems like it should be in of >> >> core. Below is, clearly, not enough but should show the idea: >> >> >> >> diff --git

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Felipe Balbi
Hi, Arnd Bergmann writes: >> >> But this needs to be done before dwc3_probe() executes. For dwc3-pci >> >> that's easy, but for DT devices, seems like it should be in of >> >> core. Below is, clearly, not enough but should show the idea: >> >> >> >> diff --git a/drivers/of/device.c

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 2:20:58 PM CEST Felipe Balbi wrote: > >> It's quite a hack, though. I still think that inheriting DMA (or > >> manually initializing a child with parent's DMA bits and pieces) is the > >> best way to go. So we're back to of_dma_configure() and > >>

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 2:20:58 PM CEST Felipe Balbi wrote: > >> It's quite a hack, though. I still think that inheriting DMA (or > >> manually initializing a child with parent's DMA bits and pieces) is the > >> best way to go. So we're back to of_dma_configure() and > >>

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Felipe Balbi
Hi, Arnd Bergmann writes: > On Thursday, September 8, 2016 2:00:13 PM CEST Felipe Balbi wrote: >> Arnd Bergmann writes: >> > On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: >> >> Arnd Bergmann writes: >> >> > That sounds a bit

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Felipe Balbi
Hi, Arnd Bergmann writes: > On Thursday, September 8, 2016 2:00:13 PM CEST Felipe Balbi wrote: >> Arnd Bergmann writes: >> > On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: >> >> Arnd Bergmann writes: >> >> > That sounds a bit clumsy for the sake of consistency with PCI.

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 2:00:13 PM CEST Felipe Balbi wrote: > Arnd Bergmann writes: > > On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: > >> Arnd Bergmann writes: > >> > That sounds a bit clumsy for the sake of consistency with PCI. > >> >

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 2:00:13 PM CEST Felipe Balbi wrote: > Arnd Bergmann writes: > > On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: > >> Arnd Bergmann writes: > >> > That sounds a bit clumsy for the sake of consistency with PCI. > >> > The advantage is that xhci

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Felipe Balbi
Hi, Arnd Bergmann writes: > On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: >> Arnd Bergmann writes: >> > On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote: >> >> > If we do that, we have to put child devices of the dwc3

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Felipe Balbi
Hi, Arnd Bergmann writes: > On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: >> Arnd Bergmann writes: >> > On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote: >> >> > If we do that, we have to put child devices of the dwc3 devices into >> >> > the platform

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: > Arnd Bergmann writes: > > On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote: > >> > If we do that, we have to put child devices of the dwc3 devices into > >> > the platform glue, and it also

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 12:43:06 PM CEST Felipe Balbi wrote: > Arnd Bergmann writes: > > On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote: > >> > If we do that, we have to put child devices of the dwc3 devices into > >> > the platform glue, and it also breaks those dwc3

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Felipe Balbi
Hi, Arnd Bergmann writes: > On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote: >> > If we do that, we have to put child devices of the dwc3 devices into >> > the platform glue, and it also breaks those dwc3 devices that don't >> > have a parent driver. >> >>

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Felipe Balbi
Hi, Arnd Bergmann writes: > On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote: >> > If we do that, we have to put child devices of the dwc3 devices into >> > the platform glue, and it also breaks those dwc3 devices that don't >> > have a parent driver. >> >> Well, this is easy

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote: > > If we do that, we have to put child devices of the dwc3 devices into > > the platform glue, and it also breaks those dwc3 devices that don't > > have a parent driver. > > Well, this is easy to fix: > > if

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 11:29:04 AM CEST Felipe Balbi wrote: > > If we do that, we have to put child devices of the dwc3 devices into > > the platform glue, and it also breaks those dwc3 devices that don't > > have a parent driver. > > Well, this is easy to fix: > > if

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Felipe Balbi
Hi, Arnd Bergmann writes: >> > @@ -178,7 +179,7 @@ static void dwc3_frame_length_adjustment(struct dwc3 >> > *dwc) >> > static void dwc3_free_one_event_buffer(struct dwc3 *dwc, >> >struct dwc3_event_buffer *evt) >> > { >> > - dma_free_coherent(dwc->dev,

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Felipe Balbi
Hi, Arnd Bergmann writes: >> > @@ -178,7 +179,7 @@ static void dwc3_frame_length_adjustment(struct dwc3 >> > *dwc) >> > static void dwc3_free_one_event_buffer(struct dwc3 *dwc, >> >struct dwc3_event_buffer *evt) >> > { >> > - dma_free_coherent(dwc->dev, evt->length, evt->buf,

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 11:03:10 AM CEST Felipe Balbi wrote: > Arnd Bergmann writes: > >> Arnd Bergmann writes: > just look at the history of the file, you'll see that an Intel employee > was a maintainer of chipidea driver. Also: > > $ git ls-files

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 11:03:10 AM CEST Felipe Balbi wrote: > Arnd Bergmann writes: > >> Arnd Bergmann writes: > just look at the history of the file, you'll see that an Intel employee > was a maintainer of chipidea driver. Also: > > $ git ls-files drivers/usb/chipidea/ | grep pci >

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Felipe Balbi
Hi, Arnd Bergmann writes: >> Arnd Bergmann writes: >> >> [...] >> >> > Regarding the DMA configuration that you mention in ci_hdrc_add_device(), >> > I think we should replace >> > >> > pdev->dev.dma_mask = dev->dma_mask; >> >

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Felipe Balbi
Hi, Arnd Bergmann writes: >> Arnd Bergmann writes: >> >> [...] >> >> > Regarding the DMA configuration that you mention in ci_hdrc_add_device(), >> > I think we should replace >> > >> > pdev->dev.dma_mask = dev->dma_mask; >> > pdev->dev.dma_parms = dev->dma_parms; >> >

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 9:15:36 AM CEST Peter Chen wrote: > > > > Right, I was specifically talking about the code in chipidea here, > > which I think is never used on the PCI bus, and how the current > > code is broken. We can probably do better than of_dma_configure() > > (see below),

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-08 Thread Arnd Bergmann
On Thursday, September 8, 2016 9:15:36 AM CEST Peter Chen wrote: > > > > Right, I was specifically talking about the code in chipidea here, > > which I think is never used on the PCI bus, and how the current > > code is broken. We can probably do better than of_dma_configure() > > (see below),

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Wed, Sep 07, 2016 at 05:24:08PM +0200, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 1:24:07 PM CEST Felipe Balbi wrote: > > > > Hi, > > > > Arnd Bergmann writes: > > > > [...] > > > > > Regarding the DMA configuration that you mention in ci_hdrc_add_device(), > > >

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Wed, Sep 07, 2016 at 05:24:08PM +0200, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 1:24:07 PM CEST Felipe Balbi wrote: > > > > Hi, > > > > Arnd Bergmann writes: > > > > [...] > > > > > Regarding the DMA configuration that you mention in ci_hdrc_add_device(), > > > I think we

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 12:08:20 PM CEST Alan Stern wrote: > On Wed, 7 Sep 2016, Arnd Bergmann wrote: > > > drivers/usb/host/ehci-fsl.c| 4 ++-- > > How did this driver end up in the patch? > > > diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c > > index

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 12:08:20 PM CEST Alan Stern wrote: > On Wed, 7 Sep 2016, Arnd Bergmann wrote: > > > drivers/usb/host/ehci-fsl.c| 4 ++-- > > How did this driver end up in the patch? > > > diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c > > index

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Alan Stern
On Wed, 7 Sep 2016, Arnd Bergmann wrote: > However, to summarize the discussion so far, I agree that > of_dma_configure() is not the solution to these problems, and I think > we can do much better: > > Splitting the usb_bus->controller field into the Linux-internal device > (used for the sysfs

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Alan Stern
On Wed, 7 Sep 2016, Arnd Bergmann wrote: > However, to summarize the discussion so far, I agree that > of_dma_configure() is not the solution to these problems, and I think > we can do much better: > > Splitting the usb_bus->controller field into the Linux-internal device > (used for the sysfs

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 1:24:07 PM CEST Felipe Balbi wrote: > > Hi, > > Arnd Bergmann writes: > > [...] > > > Regarding the DMA configuration that you mention in ci_hdrc_add_device(), > > I think we should replace > > > > pdev->dev.dma_mask = dev->dma_mask; > >

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 1:24:07 PM CEST Felipe Balbi wrote: > > Hi, > > Arnd Bergmann writes: > > [...] > > > Regarding the DMA configuration that you mention in ci_hdrc_add_device(), > > I think we should replace > > > > pdev->dev.dma_mask = dev->dma_mask; > >

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 4:04:52 PM CEST Roger Quadros wrote: > > The main use for it is to let you specify a MAC address for on-board > > ethernet devices that lack an EPROM, but any other information can be > > added that way too. > > > >> There is a bug in the USB core because of which

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 4:04:52 PM CEST Roger Quadros wrote: > > The main use for it is to let you specify a MAC address for on-board > > ethernet devices that lack an EPROM, but any other information can be > > added that way too. > > > >> There is a bug in the USB core because of which

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Roger Quadros
On 07/09/16 11:29, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 10:17:31 AM CEST Roger Quadros wrote: >>> >>> Speaking of that flag, I suppose we need the same logic to know where >>> to look for USB devices attached to a dwc3 host when we need to describe >>> them in DT. By default we

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Roger Quadros
On 07/09/16 11:29, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 10:17:31 AM CEST Roger Quadros wrote: >>> >>> Speaking of that flag, I suppose we need the same logic to know where >>> to look for USB devices attached to a dwc3 host when we need to describe >>> them in DT. By default we

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Felipe Balbi
Hi, Robin Murphy writes: > On 07/09/16 10:55, Peter Chen wrote: > [...] >>> Regarding the DMA configuration that you mention in ci_hdrc_add_device(), >>> I think we should replace >>> >>> pdev->dev.dma_mask = dev->dma_mask; >>> pdev->dev.dma_parms =

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Felipe Balbi
Hi, Robin Murphy writes: > On 07/09/16 10:55, Peter Chen wrote: > [...] >>> Regarding the DMA configuration that you mention in ci_hdrc_add_device(), >>> I think we should replace >>> >>> pdev->dev.dma_mask = dev->dma_mask; >>> pdev->dev.dma_parms = dev->dma_parms; >>>

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Robin Murphy
On 07/09/16 10:55, Peter Chen wrote: [...] >> Regarding the DMA configuration that you mention in ci_hdrc_add_device(), >> I think we should replace >> >> pdev->dev.dma_mask = dev->dma_mask; >> pdev->dev.dma_parms = dev->dma_parms; >> dma_set_coherent_mask(>dev,

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Robin Murphy
On 07/09/16 10:55, Peter Chen wrote: [...] >> Regarding the DMA configuration that you mention in ci_hdrc_add_device(), >> I think we should replace >> >> pdev->dev.dma_mask = dev->dma_mask; >> pdev->dev.dma_parms = dev->dma_parms; >> dma_set_coherent_mask(>dev,

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Felipe Balbi
Hi, Arnd Bergmann writes: [...] > Regarding the DMA configuration that you mention in ci_hdrc_add_device(), > I think we should replace > > pdev->dev.dma_mask = dev->dma_mask; > pdev->dev.dma_parms = dev->dma_parms; > dma_set_coherent_mask(>dev,

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Felipe Balbi
Hi, Arnd Bergmann writes: [...] > Regarding the DMA configuration that you mention in ci_hdrc_add_device(), > I think we should replace > > pdev->dev.dma_mask = dev->dma_mask; > pdev->dev.dma_parms = dev->dma_parms; > dma_set_coherent_mask(>dev,

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Felipe Balbi
Hi, Russell King - ARM Linux writes: > On Wed, Sep 07, 2016 at 05:29:01PM +0800, Peter Chen wrote: >> On Wed, Sep 07, 2016 at 10:52:46AM +0200, Arnd Bergmann wrote: >> > On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: >> > > >> > > The pre-condition of

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Felipe Balbi
Hi, Russell King - ARM Linux writes: > On Wed, Sep 07, 2016 at 05:29:01PM +0800, Peter Chen wrote: >> On Wed, Sep 07, 2016 at 10:52:46AM +0200, Arnd Bergmann wrote: >> > On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: >> > > >> > > The pre-condition of DT function at USB HCD

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Wed, Sep 07, 2016 at 10:48:06AM +0200, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 2:33:13 PM CEST Peter Chen wrote: > > > > > > Right, that should make it work with iommu as well. However, it does > > > not solve the other issue I mentioned above, with boards that have > > > USB

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Wed, Sep 07, 2016 at 10:48:06AM +0200, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 2:33:13 PM CEST Peter Chen wrote: > > > > > > Right, that should make it work with iommu as well. However, it does > > > not solve the other issue I mentioned above, with boards that have > > > USB

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Russell King - ARM Linux
On Wed, Sep 07, 2016 at 05:29:01PM +0800, Peter Chen wrote: > On Wed, Sep 07, 2016 at 10:52:46AM +0200, Arnd Bergmann wrote: > > On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: > > > > > > The pre-condition of DT function at USB HCD core works is the host > > > controller device

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Russell King - ARM Linux
On Wed, Sep 07, 2016 at 05:29:01PM +0800, Peter Chen wrote: > On Wed, Sep 07, 2016 at 10:52:46AM +0200, Arnd Bergmann wrote: > > On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: > > > > > > The pre-condition of DT function at USB HCD core works is the host > > > controller device

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Wed, Sep 07, 2016 at 10:52:46AM +0200, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: > > > > The pre-condition of DT function at USB HCD core works is the host > > controller device has of_node, since it is the root node for USB tree > > described at

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Wed, Sep 07, 2016 at 10:52:46AM +0200, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: > > > > The pre-condition of DT function at USB HCD core works is the host > > controller device has of_node, since it is the root node for USB tree > > described at

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: > > The pre-condition of DT function at USB HCD core works is the host > controller device has of_node, since it is the root node for USB tree > described at DT. If the host controller device is not at DT, it needs > to try to get

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: > > The pre-condition of DT function at USB HCD core works is the host > controller device has of_node, since it is the root node for USB tree > described at DT. If the host controller device is not at DT, it needs > to try to get

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 2:33:13 PM CEST Peter Chen wrote: > > > > Right, that should make it work with iommu as well. However, it does > > not solve the other issue I mentioned above, with boards that have > > USB devices hardwired to a chipidea host controller that need > > configuration

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 2:33:13 PM CEST Peter Chen wrote: > > > > Right, that should make it work with iommu as well. However, it does > > not solve the other issue I mentioned above, with boards that have > > USB devices hardwired to a chipidea host controller that need > > configuration

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 10:17:31 AM CEST Roger Quadros wrote: > > > > Speaking of that flag, I suppose we need the same logic to know where > > to look for USB devices attached to a dwc3 host when we need to describe > > them in DT. By default we look for child device nodes under the > >

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 10:17:31 AM CEST Roger Quadros wrote: > > > > Speaking of that flag, I suppose we need the same logic to know where > > to look for USB devices attached to a dwc3 host when we need to describe > > them in DT. By default we look for child device nodes under the > >

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Tue, Sep 06, 2016 at 03:27:43PM +0200, Arnd Bergmann wrote: > On Tuesday, September 6, 2016 1:50:48 PM CEST Felipe Balbi wrote: > > Hi, > > > > Arnd Bergmann writes: > > > On Tuesday, September 6, 2016 9:40:19 AM CEST Felipe Balbi wrote: > > >> > > >> this only solves the

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Tue, Sep 06, 2016 at 03:27:43PM +0200, Arnd Bergmann wrote: > On Tuesday, September 6, 2016 1:50:48 PM CEST Felipe Balbi wrote: > > Hi, > > > > Arnd Bergmann writes: > > > On Tuesday, September 6, 2016 9:40:19 AM CEST Felipe Balbi wrote: > > >> > > >> this only solves the problem for DT

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Roger Quadros
Hi Arnd, On 02/09/16 18:51, Arnd Bergmann wrote: > On Friday, September 2, 2016 10:21:23 AM CEST Alan Stern wrote: >> On Fri, 2 Sep 2016, Felipe Balbi wrote: >> >>> Hi, >>> >>> Russell King - ARM Linux writes: On Fri, Sep 02, 2016 at 12:43:39PM +0200, Arnd Bergmann

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Roger Quadros
Hi Arnd, On 02/09/16 18:51, Arnd Bergmann wrote: > On Friday, September 2, 2016 10:21:23 AM CEST Alan Stern wrote: >> On Fri, 2 Sep 2016, Felipe Balbi wrote: >> >>> Hi, >>> >>> Russell King - ARM Linux writes: On Fri, Sep 02, 2016 at 12:43:39PM +0200, Arnd Bergmann wrote: > On Thursday,

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Felipe Balbi
Arnd Bergmann writes: > On Tuesday, September 6, 2016 1:50:48 PM CEST Felipe Balbi wrote: >> Hi, >> >> Arnd Bergmann writes: >> > On Tuesday, September 6, 2016 9:40:19 AM CEST Felipe Balbi wrote: >> >> >> >> this only solves the problem for DT devices. Legacy

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Felipe Balbi
Arnd Bergmann writes: > On Tuesday, September 6, 2016 1:50:48 PM CEST Felipe Balbi wrote: >> Hi, >> >> Arnd Bergmann writes: >> > On Tuesday, September 6, 2016 9:40:19 AM CEST Felipe Balbi wrote: >> >> >> >> this only solves the problem for DT devices. Legacy devices and >> >> PCI-based

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Tue, Sep 06, 2016 at 12:38:29PM +0200, Arnd Bergmann wrote: > On Tuesday, September 6, 2016 2:35:29 PM CEST Peter Chen wrote: > > On Mon, Sep 05, 2016 at 05:39:27PM +0200, Arnd Bergmann wrote: > > > On Friday, September 2, 2016 5:16:31 PM CEST Leo Li wrote: > > > > > > > Most of these are

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Tue, Sep 06, 2016 at 12:38:29PM +0200, Arnd Bergmann wrote: > On Tuesday, September 6, 2016 2:35:29 PM CEST Peter Chen wrote: > > On Mon, Sep 05, 2016 at 05:39:27PM +0200, Arnd Bergmann wrote: > > > On Friday, September 2, 2016 5:16:31 PM CEST Leo Li wrote: > > > > > > > Most of these are

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-06 Thread Arnd Bergmann
On Tuesday, September 6, 2016 1:50:48 PM CEST Felipe Balbi wrote: > Hi, > > Arnd Bergmann writes: > > On Tuesday, September 6, 2016 9:40:19 AM CEST Felipe Balbi wrote: > >> > >> this only solves the problem for DT devices. Legacy devices and > >> PCI-based systems will still

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-06 Thread Arnd Bergmann
On Tuesday, September 6, 2016 1:50:48 PM CEST Felipe Balbi wrote: > Hi, > > Arnd Bergmann writes: > > On Tuesday, September 6, 2016 9:40:19 AM CEST Felipe Balbi wrote: > >> > >> this only solves the problem for DT devices. Legacy devices and > >> PCI-based systems will still suffer from the

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-06 Thread Felipe Balbi
Hi, Arnd Bergmann writes: > On Tuesday, September 6, 2016 9:40:19 AM CEST Felipe Balbi wrote: >> >> this only solves the problem for DT devices. Legacy devices and >> PCI-based systems will still suffer from the same problem. At least for >> dwc3, I will only be taking patches

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-06 Thread Felipe Balbi
Hi, Arnd Bergmann writes: > On Tuesday, September 6, 2016 9:40:19 AM CEST Felipe Balbi wrote: >> >> this only solves the problem for DT devices. Legacy devices and >> PCI-based systems will still suffer from the same problem. At least for >> dwc3, I will only be taking patches that solve the

  1   2   >