Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-10-13 Thread Peter Chen
On Thu, Sep 25, 2014 at 07:37:50PM -0500, Felipe Balbi wrote: HI, On Fri, Sep 26, 2014 at 07:39:34AM +0800, Peter Chen wrote: On Thu, Sep 25, 2014 at 09:15:53AM -0500, Felipe Balbi wrote: On Wed, Sep 24, 2014 at 02:23:38PM +0200, Arnd Bergmann wrote: On Wednesday 24 September 2014

RE: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-10-01 Thread Peter Chen
Subject: Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx On Tuesday 30 September 2014 20:39:34 Peter Chen wrote: Thanks, Arnd. I had not thought setting dma mask is so complicated, yes, it should check the return value, two things to confirm

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-10-01 Thread Arnd Bergmann
On Wednesday 01 October 2014 06:35:58 Peter Chen wrote: Subject: Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx On Tuesday 30 September 2014 20:39:34 Peter Chen wrote: Thanks, Arnd. I had not thought setting dma mask is so complicated, yes, it should check

RE: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-10-01 Thread Peter Chen
On Wednesday 01 October 2014 06:35:58 Peter Chen wrote: Subject: Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx On Tuesday 30 September 2014 20:39:34 Peter Chen wrote: Thanks, Arnd. I had not thought setting dma mask is so complicated, yes, it should check

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-10-01 Thread Antoine Tenart
Peter, Arnd, Felipe, On Mon, Sep 29, 2014 at 05:08:37PM +0200, Antoine Tenart wrote: On Tue, Sep 23, 2014 at 12:28:03PM +0200, Antoine Tenart wrote: Add a USB2 ChipIdea driver for ci13xxx, with optional PHY, clock and DMA mask, to support USB2 ChipIdea controllers that don't need specific

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-10-01 Thread Peter Chen
On Tue, Sep 30, 2014 at 08:12:07AM +0800, Peter Chen wrote: On Tue, Sep 23, 2014 at 12:28:03PM +0200, Antoine Tenart wrote: Add a USB2 ChipIdea driver for ci13xxx, with optional PHY, clock and DMA mask, to support USB2 ChipIdea controllers that don't need specific functions. Tested on

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-30 Thread Arnd Bergmann
On Tuesday 30 September 2014 08:12:07 Peter Chen wrote: + + if (dev-of_node) { + ret = ci_hdrc_usb2_dt_probe(dev, ci_pdata); + if (ret) + goto clk_err; + } else { + ret = dma_set_mask_and_coherent(pdev-dev,

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-30 Thread Peter Chen
On Tue, Sep 30, 2014 at 12:03:42PM +0200, Arnd Bergmann wrote: On Tuesday 30 September 2014 08:12:07 Peter Chen wrote: + + if (dev-of_node) { + ret = ci_hdrc_usb2_dt_probe(dev, ci_pdata); + if (ret) + goto clk_err; + } else {

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-30 Thread Arnd Bergmann
On Tuesday 30 September 2014 20:39:34 Peter Chen wrote: Thanks, Arnd. I had not thought setting dma mask is so complicated, yes, it should check the return value, two things to confirm: - dma_coerce_mask_and_coherent or dma_set_mask_and_coherent, the only difference of these two API is the

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-29 Thread Antoine Tenart
On Wed, Sep 24, 2014 at 04:58:14PM -0700, Sören Brinkmann wrote: On Tue, 2014-09-23 at 12:28PM +0200, Antoine Tenart wrote: Add a USB2 ChipIdea driver for ci13xxx, with optional PHY, clock and DMA mask, to support USB2 ChipIdea controllers that don't need specific functions. Tested on

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-29 Thread Antoine Tenart
Peter, Arnd, Felipe, On Tue, Sep 23, 2014 at 12:28:03PM +0200, Antoine Tenart wrote: Add a USB2 ChipIdea driver for ci13xxx, with optional PHY, clock and DMA mask, to support USB2 ChipIdea controllers that don't need specific functions. Did we agree on the modifications needed to get this

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-29 Thread Peter Chen
On Tue, Sep 23, 2014 at 12:28:03PM +0200, Antoine Tenart wrote: Add a USB2 ChipIdea driver for ci13xxx, with optional PHY, clock and DMA mask, to support USB2 ChipIdea controllers that don't need specific functions. Tested on the Marvell Berlin SoCs USB controllers. Signed-off-by: Antoine

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-27 Thread Peter Chen
On Thu, Sep 25, 2014 at 07:37:50PM -0500, Felipe Balbi wrote: HI, On Fri, Sep 26, 2014 at 07:39:34AM +0800, Peter Chen wrote: On Thu, Sep 25, 2014 at 09:15:53AM -0500, Felipe Balbi wrote: On Wed, Sep 24, 2014 at 02:23:38PM +0200, Arnd Bergmann wrote: On Wednesday 24 September 2014

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-26 Thread Arnd Bergmann
On Friday 26 September 2014 08:23:40 Peter Chen wrote: In current chipidea structure, the parent (glue layer) driver will not be used for dma, udc/host driver uses dma mask from child (core layer), at core layer we will do: pdev-dev.dma_mask = dev-dma_mask; /* this device is parent

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-26 Thread Arnd Bergmann
On Thursday 25 September 2014 19:39:34 Felipe Balbi wrote: why would a glue layer need to access registers from the core ? That sounds very odd. I haven't seen that and will, definitely, NACK such a patch can you further describe why you think a glue layer might need to access

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-26 Thread Felipe Balbi
Hi, On Fri, Sep 26, 2014 at 09:20:54AM +0200, Arnd Bergmann wrote: On Thursday 25 September 2014 19:39:34 Felipe Balbi wrote: why would a glue layer need to access registers from the core ? That sounds very odd. I haven't seen that and will, definitely, NACK such a patch can

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-25 Thread Arnd Bergmann
On Thursday 25 September 2014 09:16:48 Peter Chen wrote: + } + + if (dev-of_node) { + ret = ci_hdrc_usb2_dt_probe(dev, ci_pdata); + if (ret) + goto clk_err; + } else { + ret = dma_set_mask_and_coherent(pdev-dev,

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-25 Thread Felipe Balbi
Hi, On Wed, Sep 24, 2014 at 09:44:19AM +0200, Arnd Bergmann wrote: It is a good suggestion for adding DT support for core driver, Since we did not do it at the first, it is a little embarrass at current situation. - For the new chipidea glue drivers, it is ok we can have a child node

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-25 Thread Felipe Balbi
On Wed, Sep 24, 2014 at 02:23:38PM +0200, Arnd Bergmann wrote: On Wednesday 24 September 2014 19:29:05 Peter Chen wrote: So, it is IP CORE LIB (you suggest) vs IP CORE Platform Driver (dwc3, musb, chipidea) you are talking about, right? Except for creating another platform driver as well

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-25 Thread Antoine Tenart
Arnd, On Thu, Sep 25, 2014 at 09:12:07PM +0200, Arnd Bergmann wrote: On Tuesday 23 September 2014, Antoine Tenart wrote: +static int ci_hdrc_usb2_dt_probe(struct device *dev, +struct ci_hdrc_platform_data *ci_pdata) +{ + ci_pdata-phy =

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-25 Thread Peter Chen
On Thu, Sep 25, 2014 at 09:15:53AM -0500, Felipe Balbi wrote: On Wed, Sep 24, 2014 at 02:23:38PM +0200, Arnd Bergmann wrote: On Wednesday 24 September 2014 19:29:05 Peter Chen wrote: So, it is IP CORE LIB (you suggest) vs IP CORE Platform Driver (dwc3, musb, chipidea) you are talking

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-25 Thread Peter Chen
On Thu, Sep 25, 2014 at 09:11:35AM +0200, Arnd Bergmann wrote: On Thursday 25 September 2014 09:16:48 Peter Chen wrote: + } + + if (dev-of_node) { + ret = ci_hdrc_usb2_dt_probe(dev, ci_pdata); + if (ret) + goto clk_err; +

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-25 Thread Felipe Balbi
HI, On Fri, Sep 26, 2014 at 07:39:34AM +0800, Peter Chen wrote: On Thu, Sep 25, 2014 at 09:15:53AM -0500, Felipe Balbi wrote: On Wed, Sep 24, 2014 at 02:23:38PM +0200, Arnd Bergmann wrote: On Wednesday 24 September 2014 19:29:05 Peter Chen wrote: So, it is IP CORE LIB (you suggest)

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-25 Thread Felipe Balbi
Hi again, On Thu, Sep 25, 2014 at 07:37:50PM -0500, Felipe Balbi wrote: On Fri, Sep 26, 2014 at 07:39:34AM +0800, Peter Chen wrote: On Thu, Sep 25, 2014 at 09:15:53AM -0500, Felipe Balbi wrote: On Wed, Sep 24, 2014 at 02:23:38PM +0200, Arnd Bergmann wrote: On Wednesday 24 September 2014

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-24 Thread Arnd Bergmann
On Wednesday 24 September 2014 10:27:52 Peter Chen wrote: Antoine is adding a generic chipdea glue layer driver, which like ehci generic platform driver: drivers/usb/host/ehci-platform.c, since other architectures like MIPS (Someone submitted mips chipidea driver before) may not have device

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-24 Thread Arnd Bergmann
On Wednesday 24 September 2014 09:44:19 Arnd Bergmann wrote: We can also gradually move in some of the other glue drivers into the main driver if the differences are small enough. FWIW, I've just looked at the other glue drivers that already exist: - zevio can just get merged into the

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-24 Thread Peter Chen
On Wed, Sep 24, 2014 at 10:30:41AM +0200, Arnd Bergmann wrote: On Wednesday 24 September 2014 09:44:19 Arnd Bergmann wrote: We can also gradually move in some of the other glue drivers into the main driver if the differences are small enough. FWIW, I've just looked at the other glue

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-24 Thread Arnd Bergmann
On Wednesday 24 September 2014 19:29:05 Peter Chen wrote: So, it is IP CORE LIB (you suggest) vs IP CORE Platform Driver (dwc3, musb, chipidea) you are talking about, right? Except for creating another platform driver as well as related DT node (optional), are there any advantages compared

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-24 Thread Sören Brinkmann
On Tue, 2014-09-23 at 12:28PM +0200, Antoine Tenart wrote: Add a USB2 ChipIdea driver for ci13xxx, with optional PHY, clock and DMA mask, to support USB2 ChipIdea controllers that don't need specific functions. Tested on the Marvell Berlin SoCs USB controllers. Signed-off-by: Antoine

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-24 Thread Peter Chen
On Wed, Sep 24, 2014 at 02:23:38PM +0200, Arnd Bergmann wrote: On Wednesday 24 September 2014 19:29:05 Peter Chen wrote: So, it is IP CORE LIB (you suggest) vs IP CORE Platform Driver (dwc3, musb, chipidea) you are talking about, right? Except for creating another platform driver as well

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-24 Thread Peter Chen
On Tue, Sep 23, 2014 at 12:28:03PM +0200, Antoine Tenart wrote: Add a USB2 ChipIdea driver for ci13xxx, with optional PHY, clock and DMA mask, to support USB2 ChipIdea controllers that don't need specific functions. Tested on the Marvell Berlin SoCs USB controllers. Signed-off-by: Antoine

[PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-23 Thread Antoine Tenart
Add a USB2 ChipIdea driver for ci13xxx, with optional PHY, clock and DMA mask, to support USB2 ChipIdea controllers that don't need specific functions. Tested on the Marvell Berlin SoCs USB controllers. Signed-off-by: Antoine Tenart antoine.ten...@free-electrons.com ---

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-23 Thread Arnd Bergmann
On Tuesday 23 September 2014 12:28:03 Antoine Tenart wrote: + if (dev-of_node) { + ret = ci_hdrc_usb2_dt_probe(dev, ci_pdata); + if (ret) + goto clk_err; + } else { + ret = dma_set_mask_and_coherent(pdev-dev,

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-23 Thread Antoine Tenart
Arnd, On Tue, Sep 23, 2014 at 12:39:04PM +0200, Arnd Bergmann wrote: On Tuesday 23 September 2014 12:28:03 Antoine Tenart wrote: + if (dev-of_node) { + ret = ci_hdrc_usb2_dt_probe(dev, ci_pdata); + if (ret) + goto clk_err; +

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-23 Thread Arnd Bergmann
On Tuesday 23 September 2014 15:36:45 Antoine Tenart wrote: On Tue, Sep 23, 2014 at 12:39:04PM +0200, Arnd Bergmann wrote: On Tuesday 23 September 2014 12:28:03 Antoine Tenart wrote: + if (dev-of_node) { + ret = ci_hdrc_usb2_dt_probe(dev, ci_pdata); +

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-23 Thread Felipe Balbi
HI, On Tue, Sep 23, 2014 at 06:44:40PM +0200, Arnd Bergmann wrote: On Tuesday 23 September 2014 15:36:45 Antoine Tenart wrote: On Tue, Sep 23, 2014 at 12:39:04PM +0200, Arnd Bergmann wrote: On Tuesday 23 September 2014 12:28:03 Antoine Tenart wrote: + if (dev-of_node) { +

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-23 Thread Arnd Bergmann
On Tuesday 23 September 2014 11:55:15 Felipe Balbi wrote: On Tue, Sep 23, 2014 at 06:44:40PM +0200, Arnd Bergmann wrote: On Tuesday 23 September 2014 15:36:45 Antoine Tenart wrote: On Tue, Sep 23, 2014 at 12:39:04PM +0200, Arnd Bergmann wrote: On Tuesday 23 September 2014 12:28:03

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-23 Thread Felipe Balbi
Hi, On Tue, Sep 23, 2014 at 07:37:25PM +0200, Arnd Bergmann wrote: On Tuesday 23 September 2014 11:55:15 Felipe Balbi wrote: On Tue, Sep 23, 2014 at 06:44:40PM +0200, Arnd Bergmann wrote: On Tuesday 23 September 2014 15:36:45 Antoine Tenart wrote: On Tue, Sep 23, 2014 at 12:39:04PM

Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx

2014-09-23 Thread Peter Chen
On Tue, Sep 23, 2014 at 07:37:25PM +0200, Arnd Bergmann wrote: On Tuesday 23 September 2014 11:55:15 Felipe Balbi wrote: On Tue, Sep 23, 2014 at 06:44:40PM +0200, Arnd Bergmann wrote: On Tuesday 23 September 2014 15:36:45 Antoine Tenart wrote: On Tue, Sep 23, 2014 at 12:39:04PM +0200,