[PATCH v3 4/4] usb: musb: da8xx: Remove duplicated defines

2017-09-20 Thread Alexandre Bailon
There is some registers defined in da8xx.c though they are not used. These registers are also defined and used in musb_cppi41.c Remove these defines from da8xx.c. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 3 --- 1 file changed, 3 deletions(-)

[PATCH v3 2/4] usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx

2017-09-20 Thread Alexandre Bailon
The way to configure the DMA mode on DA8xx is different from DSPS. Add a new function to configure DMA mode on DA8xx and use a callback to call the right function based on the platform. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_cppi41.

[PATCH v2 0/4] Update MUSB CPPI 4.1 driver to correctly manage the DA8xx

2017-09-20 Thread Alexandre Bailon
the number of channels to 4 for DA8xx - Remove duplicated defines Changes in v3: - Fix a stupid type (two NULL check reversed) Alexandre Bailon (4): usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx usb: musb

[PATCH v3 3/4] usb: musb: musb_cppi41: Configure the number of channels for DA8xx

2017-09-20 Thread Alexandre Bailon
Currently, the number of channels is set to 15 but in the case of DA8xx, the number of channels is 4. Update the driver to configure the number of channels at runtime. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_cppi41.

[PATCH v3 1/4] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers

2017-09-20 Thread Alexandre Bailon
The DA8xx and DSPS platforms don't use the same address for few registers. On Da8xx, this is causing some issues (e.g. teardown that doesn't work). Configure the address of the register during the init and use them instead of constants. Reported-by: nsek...@ti.com Signed-off-by: Alexandre Bailon

Re: [PATCH v2 3/4] usb: musb: musb_cppi41: Configure the number of channels for DA8xx

2017-09-20 Thread Alexandre Bailon
On 09/20/2017 11:21 AM, Sergei Shtylyov wrote: > Hello! > > On 9/20/2017 10:35 AM, Alexandre Bailon wrote: > >> Currently, the number of channels is set to 15 but in the case of DA8xx, >> the number of channels is 4. >> Update the driver to configure the

[PATCH v2 2/4] usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx

2017-09-20 Thread Alexandre Bailon
The way to configure the DMA mode on DA8xx is different from DSPS. Add a new function to configure DMA mode on DA8xx and use a callback to call the right function based on the platform. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_cppi41.

[PATCH v2 4/4] usb: musb: da8xx: Remove duplicated defines

2017-09-20 Thread Alexandre Bailon
There is some registers defined in da8xx.c though they are not used. These registers are also defined and used in musb_cppi41.c Remove these defines from da8xx.c. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 3 --- 1 file changed, 3 deletions(-)

[PATCH v2 3/4] usb: musb: musb_cppi41: Configure the number of channels for DA8xx

2017-09-20 Thread Alexandre Bailon
Currently, the number of channels is set to 15 but in the case of DA8xx, the number of channels is 4. Update the driver to configure the number of channels at runtime. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_cppi41.

[PATCH v2 1/4] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers

2017-09-20 Thread Alexandre Bailon
The DA8xx and DSPS platforms don't use the same address for few registers. On Da8xx, this is causing some issues (e.g. teardown that doesn't work). Configure the address of the register during the init and use them instead of constants. Reported-by: nsek...@ti.com Signed-off-by: Alexandre Bailon

[PATCH v2 0/4] Update MUSB CPPI 4.1 driver to correctly manage the DA8xx

2017-09-20 Thread Alexandre Bailon
the number of channels to 4 for DA8xx - Remove duplicated defines Alexandre Bailon (4): usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx usb: musb: musb_cppi41: Configure the number of channels for DA8xx usb

Re: [PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers

2017-09-12 Thread Alexandre Bailon
On 08/15/2017 12:12 PM, Sergei Shtylyov wrote: > Hello! > > On 8/13/2017 3:04 PM, Alexandre Bailon wrote: > >> The DA8xx and DSPS platforms don't use the same address for few >> registers. >> On Da8xx, this is causing some issues (e.g. teardown that doesn't w

Re: [PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers

2017-09-12 Thread Alexandre Bailon
Hi Bin, Sekhar On 09/07/2017 07:16 PM, Bin Liu wrote: > On Mon, Sep 04, 2017 at 06:32:11PM +0530, Sekhar Nori wrote: >> On Monday 14 August 2017 07:06 PM, Sekhar Nori wrote: >>> On Monday 14 August 2017 07:01 PM, Sekhar Nori wrote: >>>> Hi, >>>> >>

[PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers

2017-08-13 Thread Alexandre Bailon
The DA8xx and DSPS platforms don't use the same address for few registers. On Da8xx, this is causing some issues (e.g. teardown that doesn't work). Configure the address of the register during the init and use them instead of constants. Reported-by: nsek...@ti.com Signed-off-by: Alexandre Bailon

[PATCH 2/2] usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx

2017-08-13 Thread Alexandre Bailon
The way to configure the DMA mode on DA8xx is different from DSPS. Add a new function to configure DMA mode on DA8xx and use a callback to call the right function based on the platform. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_cppi41.

[PATCH 0/2] Update MUSB CPPI 4.1 driver to correctly manage the DA8xx

2017-08-13 Thread Alexandre Bailon
intends to fix the teardown and to correctly program the DMA mode. This series has been roughly tested. I have only tried it on the DA580 LCK and the BeagleBone Black. Only the device mode (msc and ecm) have been tested. Alexandre Bailon (2): usb: musb: musb_cppi41: Fix the address of teardown

Re: Warning dump on OMAP-L138 when g_zero module is removed

2017-08-05 Thread Alexandre Bailon
Hi Sekhar, On 07/21/2017 05:18 PM, Alexandre Bailon wrote: > Hi Sekhar, > > On 07/10/2017 01:00 PM, Sekhar Nori wrote: > > On Thursday 06 July 2017 10:43 PM, Alexandre Bailon wrote: > >> On 06/29/2017 03:50 PM, Sekhar Nori wrote: > >>> Hi Alexandre, Bin, >

Re: Warning dump on OMAP-L138 when g_zero module is removed

2017-07-21 Thread Alexandre Bailon
Hi Sekhar, On 07/10/2017 01:00 PM, Sekhar Nori wrote: > On Thursday 06 July 2017 10:43 PM, Alexandre Bailon wrote: >> On 06/29/2017 03:50 PM, Sekhar Nori wrote: >>> Hi Alexandre, Bin, >>> >>> With latest linux-next, I see a warning dump when I remove g_zero[1

Re: Warning dump on OMAP-L138 when g_zero module is removed

2017-07-06 Thread Alexandre Bailon
On 06/29/2017 03:50 PM, Sekhar Nori wrote: > Hi Alexandre, Bin, > > With latest linux-next, I see a warning dump when I remove g_zero[1] on > OMAP-L138 LCDK board. I am building the kernel with davinci_all_defconfig. > > It is not present in latest mainline because the warnings are introduced >

[PATCH v4] usb: musb: musb_cppi41: Defer probe only if DMA is not ready

2017-05-19 Thread Alexandre Bailon
If dma_request_slave_channel() failed to return a channel, then the driver will print an error and request to defer probe, regardless of the cause of the failure. Defer if the DMA is not ready yet otherwise print an error. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> Reviewed-by:

[RESEND PATCH v5] ARM: dts: da850: Add the CPPI 4.1 DMA to the USB OTG controller

2017-05-19 Thread Alexandre Bailon
This adds the CPPI 4.1 DMA controller to the USB OTG controller. Changes since v2: - Fixed the the property reg-names (had glue register defined) - Removed few useless property Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- arch/arm/boot/dts/da850.dts

[PATCH v3] usb: musb: musb_cppi41: Update an error message

2017-05-19 Thread Alexandre Bailon
If dma_request_slave_channel() failed to return a channel, then the driver will print an error and request to defer probe, regardless of the cause of the failure. Defer if the DMA is not ready yet otherwise print an error. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drive

[PATCH v2] usb: musb: musb_cppi41: Update an error message

2017-05-05 Thread Alexandre Bailon
If dma_request_slave_channel() failed to return a channel, then the driver will print an error and request to defer probe, regardless of the cause of the failure. Only defer if the DMA is not ready yet and print an error to explain that we are deferring probe. Signed-off-by: Alexandre Bailon

Re: [PATCH] usb: musb: musb_cppi41: Update an error message

2017-05-02 Thread Alexandre Bailon
On 05/01/2017 04:47 PM, Bin Liu wrote: Hi, On Fri, Apr 28, 2017 at 06:04:54PM +0200, Alexandre Bailon wrote: If dma_request_slave_channel() failed to return a channel, then the driver will print an error and request to defer probe. Update the error message to explain we are defrering probe

[PATCH] usb: musb: musb_cppi41: Update an error message

2017-04-28 Thread Alexandre Bailon
If dma_request_slave_channel() failed to return a channel, then the driver will print an error and request to defer probe. Update the error message to explain we are defrering probe. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_cppi41.c | 1 + 1 file c

Re: [PATCH v2] ARM: davinci: Add the clock for the CPPI 4.1 DMA engine

2017-04-07 Thread Alexandre Bailon
On 04/07/2017 06:15 PM, Alexandre Bailon wrote: On 04/07/2017 04:36 PM, Sekhar Nori wrote: On Wednesday 05 April 2017 10:47 PM, Alexandre Bailon wrote: The CPPI 4.1 DMA is sharing its clock with the USB OTG, and most of the time, the clock will be enabled by USB. But during the init

Re: [PATCH v2] ARM: davinci: Add the clock for the CPPI 4.1 DMA engine

2017-04-07 Thread Alexandre Bailon
On 04/07/2017 04:36 PM, Sekhar Nori wrote: On Wednesday 05 April 2017 10:47 PM, Alexandre Bailon wrote: The CPPI 4.1 DMA is sharing its clock with the USB OTG, and most of the time, the clock will be enabled by USB. But during the init of the DMA, USB is not enabled (waiting for DMA

[PATCH v2] ARM: davinci: Add the clock for the CPPI 4.1 DMA engine

2017-04-05 Thread Alexandre Bailon
-by: Alexandre Bailon <abai...@baylibre.com> --- arch/arm/mach-davinci/da830.c | 6 ++ arch/arm/mach-davinci/da850.c | 6 ++ 2 files changed, 12 insertions(+) diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index 073c458..bd88470 100644 --- a/arch/arm/mach-d

Re: [PATCH] ARM: davinci: Add the clock for the CPPI 4.1 DMA engine

2017-04-05 Thread Alexandre Bailon
On 04/04/2017 08:16 AM, Sekhar Nori wrote: On Wednesday 29 March 2017 09:39 PM, Alexandre Bailon wrote: The CPPI 4.1 DMA is sharing its clock with the USB OTG, and most of the time, the clock will be enabled by USB. But during the init of the DMA, USB is not enabled (waiting for DMA

[PATCH][linux-next] dmaengine: cppi41: Fix an Oops happening in cppi41_dma_probe()

2017-04-05 Thread Alexandre Bailon
devm_*()") Reported-by: Tony Lindgren <t...@atomide.com> Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/dma/cppi41.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c index 0be56c9..f7e965f 10

Re: [PATCH v7 2/3] usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx

2017-04-05 Thread Alexandre Bailon
On 04/03/2017 04:59 PM, Bin Liu wrote: On Wed, Mar 29, 2017 at 06:24:31PM +0200, Alexandre Bailon wrote: Currently, only the PIO mode is supported. This add support of CPPI 4.1 to DA8xx. As the In DA8xx the CPPI 4.1 DMA is a part of the USB. Create the CPPI 4.1 device as a child of USB. Signed

[PATCH v7 3/3] usb: musb: musb_cppi41: Workaround DMA stall issue during teardown

2017-03-29 Thread Alexandre Bailon
The DMA may hang up if a teardown is initiated while an endpoint is still active (Advisory 2.3.27 of DA8xx errata). To workaround this issue, add a delay before to initiate the teardown. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 2 +- drive

[PATCH v7 1/3] usb: musb: Use shared irq

2017-03-29 Thread Alexandre Bailon
In the DA8xx, USB and CPPI 4.1 are sharing the same interrupt line. Update the driver to request a shared irq. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_

[PATCH v7 2/3] usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx

2017-03-29 Thread Alexandre Bailon
Currently, only the PIO mode is supported. This add support of CPPI 4.1 to DA8xx. As the In DA8xx the CPPI 4.1 DMA is a part of the USB. Create the CPPI 4.1 device as a child of USB. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/Kconfig | 4 ++-- drivers/us

Re: [PATCH] ARM: davinci: Add the clock for the CPPI 4.1 DMA engine

2017-03-29 Thread Alexandre Bailon
Hello Serge, On 03/29/2017 06:16 PM, Sergei Shtylyov wrote: Hello! On 03/29/2017 07:09 PM, Alexandre Bailon wrote: The CPPI 4.1 DMA is sharing its clock with the USB OTG, and most of the time, the clock will be enabled by USB. But during the init of the DMA, USB is not enabled (waiting

[PATCH v7 0/3] usb: musb: da8xx: Add DMA support

2017-03-29 Thread Alexandre Bailon
k and IRQ management has been moved to MUSB DA8xx glue (was in CPPI 4.1 driver) - I have added a partial support PM runtime. The goal was to use PM runtime to manage clock of MUSB and CPPI 4.1 (they use the same clock). - CPPI 4.1 is now achild of MUSB DA8xx glue. Alexandre Bailon (3): usb:

[PATCH] ARM: davinci: Add the clock for the CPPI 4.1 DMA engine

2017-03-29 Thread Alexandre Bailon
: This patch is to apply instead of: "ARM: davinci: Make the usb20 clock available to PM runtime" Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- arch/arm/mach-davinci/da830.c| 1 + arch/arm/mach-davinci/da850.c| 1 + arch/arm/mach-davinci/da8xx-dt.c | 2 ++ 3 files chang

Re: [RESEND PATCH v6 4/4] usb: musb: da8xx: Add a primary support of PM runtime

2017-03-27 Thread Alexandre Bailon
On 03/27/2017 07:38 PM, Grygorii Strashko wrote: On 03/27/2017 11:39 AM, Alexandre Bailon wrote: Hello Grygorii, On 03/24/2017 06:26 PM, Grygorii Strashko wrote: On 03/24/2017 09:36 AM, Alexandre Bailon wrote: Currently, MUSB DA8xx glue driver doesn't have PM runtime support. Because

Re: [RESEND PATCH v6 4/4] usb: musb: da8xx: Add a primary support of PM runtime

2017-03-27 Thread Alexandre Bailon
Hello Grygorii, On 03/24/2017 06:26 PM, Grygorii Strashko wrote: On 03/24/2017 09:36 AM, Alexandre Bailon wrote: > Currently, MUSB DA8xx glue driver doesn't have PM runtime support. > Because the CPPI 4.1 is using the same clock as MUSB DA8xx and > CPPI 4.1 is a child of MUSB DA8xx

[RESEND PATCH v6 1/4] usb: musb: Use shared irq

2017-03-24 Thread Alexandre Bailon
In the DA8xx, USB and CPPI 4.1 are sharing the same interrupt line. Update the driver to request a shared irq. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_

[RESEND PATCH v6 4/4] usb: musb: da8xx: Add a primary support of PM runtime

2017-03-24 Thread Alexandre Bailon
. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index ed28afd..89e12f6 100644 --- a/drivers/usb/musb/da8xx.c

[RESEND PATCH v6 2/4] usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx

2017-03-24 Thread Alexandre Bailon
Currently, only the PIO mode is supported. This add support of CPPI 4.1 to DA8xx. As the In DA8xx the CPPI 4.1 DMA is a part of the USB. Create the CPPI 4.1 device as a child of USB. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/Kconfig | 4 ++-- drivers/us

[RESEND PATCH v6 3/4] usb: musb: musb_cppi41: Workaround DMA stall issue during teardown

2017-03-24 Thread Alexandre Bailon
The DMA may hang up if a teardown is initiated while an endpoint is still active (Advisory 2.3.27 of DA8xx errata). To workaround this issue, add a delay before to initiate the teardown. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 2 +- drive

[RESEND PATCH v6 0/4] usb: musb: da8xx: Add DMA support

2017-03-24 Thread Alexandre Bailon
ock of MUSB and CPPI 4.1 (they use the same clock). - CPPI 4.1 is now achild of MUSB DA8xx glue. Alexandre Bailon (4): usb: musb: Use shared irq usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx usb: musb: musb_cppi41: Workaround DMA stall issue during teardown usb: musb: da8xx: A

Re: [PATCH] usb: musb: cppi41: don't check early-TX-interrupt for Isoch transfer

2017-03-02 Thread Alexandre Bailon
> time the next transfer is scheduled. So skip this polling workaround for > Isoch transfer. > > Fixes: a655f481d83d6 ("usb: musb: musb_cppi41: handle pre-mature TX complete > interrupt") > Cc: <sta...@vger.kernel.org> #4.1+ > Reported-by: Alexandre Bailon <abai.

[PATCH v6 0/4] usb: musb: da8xx: Add DMA support

2017-02-15 Thread Alexandre Bailon
ock of MUSB and CPPI 4.1 (they use the same clock). - CPPI 4.1 is now achild of MUSB DA8xx glue. Alexandre Bailon (4): usb: musb: Use shared irq usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx usb: musb: musb_cppi41: Workaround DMA stall issue during teardown usb: musb: da8xx: A

[PATCH v6 4/4] usb: musb: da8xx: Add a primary support of PM runtime

2017-02-15 Thread Alexandre Bailon
. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index ed28afd..89e12f6 100644 --- a/drivers/usb/musb/da8xx.c

[PATCH v6 3/4] usb: musb: musb_cppi41: Workaround DMA stall issue during teardown

2017-02-15 Thread Alexandre Bailon
The DMA may hang up if a teardown is initiated while an endpoint is still active (Advisory 2.3.27 of DA8xx errata). To workaround this issue, add a delay before to initiate the teardown. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 2 +- drive

[PATCH v6 1/4] usb: musb: Use shared irq

2017-02-15 Thread Alexandre Bailon
In the DA8xx, USB and CPPI 4.1 are sharing the same interrupt line. Update the driver to request a shared irq. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_

[PATCH v6 2/4] usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx

2017-02-15 Thread Alexandre Bailon
Currently, only the PIO mode is supported. This add support of CPPI 4.1 to DA8xx. As the In DA8xx the CPPI 4.1 DMA is a part of the USB. Create the CPPI 4.1 device as a child of USB. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/Kconfig | 4 ++-- drivers/us

[PATCH v5 3/5] dmaengine: cppi41: Move some constants to glue layer

2017-02-15 Thread Alexandre Bailon
Some constants are defined and use by the driver whereas they are specifics to AM335x. Add new variables to the glue layer, initialize them with the constants, and use them in the driver. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/dma/cppi41.c | 20 ++---

[PATCH v5 2/5] dmaengine: cppi41: rename platform variables

2017-02-15 Thread Alexandre Bailon
-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/dma/cppi41.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c index 34a8156..d1b5569 100644 --- a/drivers/dma/cppi41.c +++ b/drivers/dma/cppi41.c @@ -149,7

[PATCH v5 4/5] dmaengine: cppi41: init_sched(): Get number of channels from DT

2017-02-15 Thread Alexandre Bailon
Despite the driver is already using DT to get the number of channels, init_sched() is using an hardcoded value to get it. Use DT to get the number of channels. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/dma/cppi41.c | 20 1 file changed, 12 inse

[PATCH v5 0/5] dmaengine: cppi41: Make CPPI 4.1 driver more generic

2017-02-15 Thread Alexandre Bailon
. Alexandre Bailon (5): dmaengine: cppi41: Remove usbss_mem dmaengine: cppi41: rename platform variables dmaengine: cppi41: Move some constants to glue layer dmaengine: cppi41: init_sched(): Get number of channels from DT dmaengine: cppi41: Remove isr callback from glue layer drivers/dma

[PATCH v5 5/5] dmaengine: cppi41: Remove isr callback from glue layer

2017-02-15 Thread Alexandre Bailon
All the platform code to manage IRQ has been moved to MUSB, and now the interrupt handler is completely generic. Remove the isr callback that is not useful anymore. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/dma/cppi41.c | 4 +--- 1 file changed, 1 insertion

[PATCH v4 0/3] dmaengine: cppi41: Add dma support to da8xx

2017-01-30 Thread Alexandre Bailon
ed because they were no required anymore because CPPI 4.1 driver has been made more generic. - In v1, the driver were managing the clock for DA8xx paltform. This is not needed as CPPI 4.1 will be a child of MUSB DA8xx glue, we can use PM runtime and let the DA8xx glue driver manage it. Alexan

[PATCH v4 2/3] dmaengine: cppi41: Add support of DA8xx to CPPI 4.1

2017-01-30 Thread Alexandre Bailon
The DA8xx has a CPPI 4.1 DMA controller. This is add the glue layer required to make it work on DA8xx. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/dma/Kconfig | 6 +++--- drivers/dma/cppi41.c | 23 +++ 2 files changed, 26 insertions(+), 3 del

[PATCH v4 3/3] dmaengine: cppi41: Fix teardown warnings

2017-01-30 Thread Alexandre Bailon
get some when I run some corner case. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/dma/cppi41.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c index 5c501da..9fdd824 100644 --- a/drivers/dma/cppi41.c

[PATCH v5] ARM: dts: da850: Add the CPPI 4.1 DMA to the USB OTG controller

2017-01-30 Thread Alexandre Bailon
This adds the CPPI 4.1 DMA controller to the USB OTG controller. Changes since v4: - Fix the overlaping address between usb and cppi41 nodes. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- arch/arm/boot/dts/da850.dtsi | 27 ++- 1 file changed, 26 inse

[PATCH v4 1/3] dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA controller

2017-01-30 Thread Alexandre Bailon
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx CPPI 4.1 DMA controller. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> Acked-by: Rob Herring <r...@kernel.org> --- .../devicetree/bindings/usb/da8xx-usb.txt | 41 +- 1 file changed, 40 inse

[PATCH v3] ARM: davinci: Make the usb20 clock available to PM runtime

2017-01-25 Thread Alexandre Bailon
Since USB20 subsystem uses just one clock, there is no need of a con_id, so we are using NULL. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> Suggested-by: Sekhar Nori <nsek...@ti.com> --- arch/arm/mach-davinci/da830.c | 2 +- arch/arm/mach-davinci/da850.c | 2 +- a

[PATCH v5 0/5] usb: musb: da8xx: Add DMA support

2017-01-25 Thread Alexandre Bailon
I 4.1 (they use the same clock). - CPPI 4.1 is now achild of MUSB DA8xx glue. Alexandre Bailon (5): usb: musb: da8xx: Remove CPPI 3.0 quirk and methods usb: musb: Use shared irq usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx usb: musb: musb_cppi41: Workaround DMA stall issue duri

[PATCH v5 1/5] usb: musb: da8xx: Remove CPPI 3.0 quirk and methods

2017-01-25 Thread Alexandre Bailon
or DMA") Signed-off-by: Alexandre Bailon <abai...@baylibre.com> Acked-by: Sergei Shtylyov <sergei.shtyl...@cogentembedded.com> Acked-by: Tony Lindgren <t...@atomide.com> --- drivers/usb/musb/da8xx.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drive

[PATCH v5 2/5] usb: musb: Use shared irq

2017-01-25 Thread Alexandre Bailon
In the DA8xx, USB and CPPI 4.1 are sharing the same interrupt line. Update the driver to request a shared irq. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_

[PATCH v5 4/5] usb: musb: musb_cppi41: Workaround DMA stall issue during teardown

2017-01-25 Thread Alexandre Bailon
The DMA may hang up if a teardown is initiated while an endpoint is still active (Advisory 2.3.27 of DA8xx errata). To workaround this issue, add a delay before to initiate the teardown. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 2 +- drive

[PATCH v5 3/5] usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx

2017-01-25 Thread Alexandre Bailon
Currently, only the PIO mode is supported. This add support of CPPI 4.1 to DA8xx. As the In DA8xx the CPPI 4.1 DMA is a part of the USB. Create the CPPI 4.1 device as a child of USB. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/Kconfig | 4 ++-- drivers/us

[PATCH v5 5/5] usb: musb: da8xx: Add a primary support of PM runtime

2017-01-25 Thread Alexandre Bailon
. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index d87fb9b..bebc9ed 100644 --- a/drivers/usb/musb/da8xx.c

[PATCH v5 2/6] usb: musb: cppi41: Detect aborted transfers in cppi41_dma_callback()

2017-01-25 Thread Alexandre Bailon
driver perform some action such as acknowledge the interrupt that may be fired during a teardown. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_cppi41.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb/musb_cppi

[PATCH v5 1/6] usb: musb: dma: Add a DMA completion platform callback

2017-01-25 Thread Alexandre Bailon
Currently, the CPPI 4.1 driver is not completely generic and only works on DSPS. This is because of IRQ management. Add a callback to dma_controller that could be invoked on DMA completion to acknowledge the IRQ. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/us

[PATCH v5 4/6] usb: musb: cppi_dma: Clean up cppi41_dma_controller structure

2017-01-25 Thread Alexandre Bailon
A pointer to musb is now present in the dma_controller structure. Remove the one present in cppi41_dma_controller structure. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_cppi41.c | 29 + 1 file changed, 13 insertions(

[PATCH v5 5/6] usb: musb: cppi_dma: Clean up tusb_omap_dma structure

2017-01-25 Thread Alexandre Bailon
A pointer to musb is now present in the dma_controller structure. Remove the one present in tusb_omap_dma structure. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/tusb6010_omap.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drive

[PATCH v5 3/6] usb: musb: cppi_dma: Clean up cppi structure

2017-01-25 Thread Alexandre Bailon
A pointer to musb is now present in the dma_controller structure. Remove the one present in cppi structure. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/cppi_dma.c | 26 +- drivers/usb/musb/cppi_dma.h | 1 - 2 files changed, 13 inse

[PATCH v5 0/6] usb: musb: cppi41: Add a way to manage DMA irq

2017-01-25 Thread Alexandre Bailon
nd the DMA function introduced in musb_dsps with #ifdef / #endif. Changes in v2: - Fix some typo in commit messages - Add more explanation about some changes made by patch 2 in commit message Alexandre Bailon (6): usb: musb: dma: Add a DMA completion platform callback usb: musb: cppi41: Dete

[PATCH v5 6/6] usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in DSPS

2017-01-25 Thread Alexandre Bailon
the interrupt management to DSPS driver. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/dma/cppi41.c | 28 --- drivers/usb/musb/musb_dsps.c | 81 ++-- 2 files changed, 86 insertions(+), 23 deletions(-) diff

[PATCH v2] arm: davinci: Make the usb20 clock available to PM runtime

2017-01-24 Thread Alexandre Bailon
Add usb20 to the list of clock supported by PM runtime. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> Suggested-by: Sekhar Nori <nsek...@ti.com> --- arch/arm/mach-davinci/da830.c | 2 +- arch/arm/mach-davinci/da850.c | 2 +- arch/arm/mach-davinci/usb-da8xx.c | 2

[PATCH v4] ARM: dts: da850: Add the CPPI 4.1 DMA to the USB OTG controller

2017-01-24 Thread Alexandre Bailon
This adds the CPPI 4.1 DMA controller to the USB OTG controller. Changes since v3: - Don't use a wildcard for compatible property. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- arch/arm/boot/dts/da850.dtsi | 25 + 1 file changed, 25 insertions(+) diff

[PATCH v4 1/5] usb: musb: da8xx: Remove CPPI 3.0 quirk and methods

2017-01-24 Thread Alexandre Bailon
or DMA") Signed-off-by: Alexandre Bailon <abai...@baylibre.com> Acked-by: Sergei Shtylyov <sergei.shtyl...@cogentembedded.com> Acked-by: Tony Lindgren <t...@atomide.com> --- drivers/usb/musb/da8xx.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drive

[PATCH v4 4/5] usb: musb: musb_cppi41: Workaround DMA stall issue during teardown

2017-01-24 Thread Alexandre Bailon
The DMA may hung up if a teardown is initiated while an endpoint is still active (Advisory 2.3.27 of DA8xx errata). To workaround this issue, add a delay before to initiate the teardown. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 2 +- drive

[PATCH v4 0/5] usb: musb: da8xx: Add DMA support

2017-01-24 Thread Alexandre Bailon
use PM runtime sync operation. Changes in v2: - Clock and IRQ management has been moved to MUSB DA8xx glue (was in CPPI 4.1 driver) - I have added a partial support PM runtime. The goal was to use PM runtime to manage clock of MUSB and CPPI 4.1 (they use the same clock). - CPPI 4.1 is now achild

[PATCH v4 2/5] usb: musb: Use shared irq

2017-01-24 Thread Alexandre Bailon
In the DA8xx, USB and CPPI 4.1 are sharing the same interrupt line. Update the driver to request a shared irq. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_

[PATCH v4 3/5] usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx

2017-01-24 Thread Alexandre Bailon
Currently, only the PIO mode is supported. This add support of CPPI 4.1 to DA8xx. As the In DA8xx the CPPI 4.1 DMA is a part of the USB. Create the CPPI 4.1 device as a child of USB. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/Kconfig | 4 ++-- drivers/us

[PATCH v4 5/5] usb: musb: da8xx: Add a primary support of PM runtime

2017-01-24 Thread Alexandre Bailon
. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index d87fb9b..bebc9ed 100644 --- a/drivers/usb/musb/da8xx.c

[PATCH v3 3/3] dmaengine: cppi41: Fix teardown warnings

2017-01-24 Thread Alexandre Bailon
get some when I run some corner case. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/dma/cppi41.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c index 5c501da..9fdd824 100644 --- a/drivers/dma/cppi41.c

[PATCH v3 2/3] dmaengine: cppi41: Add support of DA8xx to CPPI 4.1

2017-01-24 Thread Alexandre Bailon
The DA8xx has a CPPI 4.1 DMA controller. This is add the glue layer required to make it work on DA8xx. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/dma/Kconfig | 6 +++--- drivers/dma/cppi41.c | 23 +++ 2 files changed, 26 insertions(+), 3 del

[PATCH v3 1/3] dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA controller

2017-01-24 Thread Alexandre Bailon
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx CPPI 4.1 DMA controller. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- .../devicetree/bindings/usb/da8xx-usb.txt | 39 ++ 1 file changed, 39 insertions(+) diff --git a/Documentation/devicetree/bi

[PATCH v3 0/3] dmaengine: cppi41: Add dma support to da8xx

2017-01-24 Thread Alexandre Bailon
ore generic. - In v1, the driver were managing the clock for DA8xx paltform. This is not needed as CPPI 4.1 will be a child of MUSB DA8xx glue, we can use PM runtime and let the DA8xx glue driver manage it. Alexandre Bailon (3): dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA co

Re: [PATCH v4 0/6] usb: musb: cppi41: Add a way to manage DMA irq

2017-01-24 Thread Alexandre Bailon
On 01/23/2017 10:26 PM, Bin Liu wrote: > On Mon, Jan 23, 2017 at 05:48:02PM +0100, Alexandre Bailon wrote: > > This series was "dmaengine: cppi41: Make the driver more generic". > > I have tried to separate as munch I could CPPI 4.1 MUSB driver changes. > > &

Re: [PATCH v3 2/3] dmaengine: cppi41: Add support of DA8xx to CPPI 4.1

2017-01-23 Thread Alexandre Bailon
On 01/19/2017 07:15 PM, Sergei Shtylyov wrote: > On 01/19/2017 02:13 PM, Alexandre Bailon wrote: > > > The DA8xx has a CPPI 4.1 DMA controller. > > This is add the glue layer required to make it work on DA8xx. > > > > Signed-off-by: Alexandre Bailon <abai...@bayli

Re: [PATCH v3 1/3] usb: musb: dma: Add a DMA completion platform callback

2017-01-23 Thread Alexandre Bailon
On 01/20/2017 09:00 PM, Bin Liu wrote: > On Thu, Jan 19, 2017 at 11:06:57AM +0100, Alexandre Bailon wrote: >> Currently, the CPPI 4.1 driver is not completely generic and >> only work on dsps. This is because of IRQ management. >> Add a callback to dma_controller that co

Re: [PATCH v3 3/3] usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in dsps

2017-01-23 Thread Alexandre Bailon
On 01/20/2017 09:17 PM, Bin Liu wrote: > On Thu, Jan 19, 2017 at 11:06:59AM +0100, Alexandre Bailon wrote: >> Despite the CPPI 4.1 is a generic DMA, it is tied to USB. >> On the dsps, CPPI 4.1 interrupt's registers are in USBSS (the MUSB glue). >> Currently, to enabl

Re: [PATCH v3 4/5] usb: musb: musb_cppi41: Workaround DMA stall issue during teardown

2017-01-20 Thread Alexandre Bailon
On 01/19/2017 05:56 PM, Tony Lindgren wrote: > * Alexandre Bailon <abai...@baylibre.com> [170119 06:09]: >> The DMA may hung up if a teardown is initiated while an endpoint is still >> active (Advisory 2.3.27 of DA8xx errata). >> To workaround this issue, add

Re: [PATCH] arm: davinci: Make the usb20 clock available to PM runtime

2017-01-20 Thread Alexandre Bailon
On 01/20/2017 10:24 AM, Sekhar Nori wrote: > On Thursday 19 January 2017 11:01 PM, Alexandre Bailon wrote: >> On 01/19/2017 05:49 PM, Grygorii Strashko wrote: >>> On 01/19/2017 09:08 AM, Alexandre Bailon wrote: >>>> On 01/19/2017 03:48 PM, Sekhar Nori wrote: >>&

Re: [PATCH] arm: davinci: Make the usb20 clock available to PM runtime

2017-01-19 Thread Alexandre Bailon
On 01/19/2017 05:49 PM, Grygorii Strashko wrote: > On 01/19/2017 09:08 AM, Alexandre Bailon wrote: >> On 01/19/2017 03:48 PM, Sekhar Nori wrote: >>> On Thursday 19 January 2017 07:39 PM, Alexandre Bailon wrote: >>>> Add usb20 to the list of clock supported by PM

Re: [PATCH v3 3/5] usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx

2017-01-19 Thread Alexandre Bailon
On 01/19/2017 03:08 PM, Alexandre Bailon wrote: > Currently, only the PIO mode is supported. > This add support of CPPI 4.1 to DA8xx. > As the In DA8xx the CPPI 4.1 DMA is a part of the USB. > Create the CPPI 4.1 device as a child of USB. > > Signed-off-by: Alexandre Bailon <

Re: [PATCH] arm: davinci: Make the usb20 clock available to PM runtime

2017-01-19 Thread Alexandre Bailon
On 01/19/2017 03:48 PM, Sekhar Nori wrote: > On Thursday 19 January 2017 07:39 PM, Alexandre Bailon wrote: >> Add usb20 to the list of clock supported by PM runtime. >> >> Signed-off-by: Alexandre Bailon <abai...@baylibre.com> >> --- >> arch/arm/mach-davinc

[PATCH] ARM: dts: da850: Add the CPPI 4.1 DMA to the USB OTG controller

2017-01-19 Thread Alexandre Bailon
This adds the CPPI 4.1 DMA controller to the USB OTG controller. Changes since v2: - Fixed the the property reg-names (had glue register defined) - Removed few useless property Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- arch/arm/boot/dts/da850.dts

[PATCH v3 5/5] usb: musb: da8xx: Add a primary support of PM runtime

2017-01-19 Thread Alexandre Bailon
to enable / disable the clock by using PM runtime. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index 8

[PATCH] arm: davinci: Make the usb20 clock available to PM runtime

2017-01-19 Thread Alexandre Bailon
Add usb20 to the list of clock supported by PM runtime. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- arch/arm/mach-davinci/pm_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-davinci/pm_domain.c b/arch/arm/mach-davinci/pm_domain.c

[PATCH v3 4/5] usb: musb: musb_cppi41: Workaround DMA stall issue during teardown

2017-01-19 Thread Alexandre Bailon
The DMA may hung up if a teardown is initiated while an endpoint is still active (Advisory 2.3.27 of DA8xx errata). To workaround this issue, add a delay before to initiate the teardown. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 2 +- drive

[PATCH v3 2/5] usb: musb: Use shared irq

2017-01-19 Thread Alexandre Bailon
In the DA8xx, USB and CPPI 4.1 are sharing the same interrupt line. Update the driver to request a shared irq. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_

  1   2   3   >