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 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 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 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. > > &

[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 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 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 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 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 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 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 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

[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 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 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 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 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 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 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 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 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/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 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 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 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 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 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 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 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 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 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 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 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 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 v3 3/3] usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in dsps

2017-01-19 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 | 77 ++-- 2 files changed, 82 insertions(+), 23 deletions(-) diff

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

2017-01-19 Thread Alexandre Bailon
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 could be invoked on DMA completion to acknodlege the IRQ. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/us

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

2017-01-19 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 v3 0/3] usb: musb: cppi41: Add a way to manage DMA irq

2017-01-19 Thread Alexandre Bailon
about some changes made by patch 2 in commit message Alexandre Bailon (3): usb: musb: dma: Add a DMA completion platform callback usb: musb: cppi41: Detect aborted transfers in cppi41_dma_callback() usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in dsps drivers/dma/cppi41.c

[PATCH v3 0/4] dmaengine: cppi41: Make CPPI 4.1 driver more generic

2017-01-19 Thread Alexandre Bailon
ndgren's patches fix the issue. Alexandre Bailon (4): 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 drive

[PATCH v3 2/4] dmaengine: cppi41: rename platform variables

2017-01-19 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 1743d3d..a6addc3 100644 --- a/drivers/dma/cppi41.c +++ b/drivers/dma/cppi41.c @@ -147,7

[PATCH v3 3/4] dmaengine: cppi41: Move some constants to glue layer

2017-01-19 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 v3 4/4] dmaengine: cppi41: init_sched(): Get number of channels from DT

2017-01-19 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 | 26 +++--- 1 file chang

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

2017-01-19 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 1/4] dmaengine: cppi41: Remove usbss_mem

2017-01-19 Thread Alexandre Bailon
In order to make CPPI 4.1 DMA driver more generic, accesses to USBSS have been removed. So it is not required anymore to map the "glue" register's. Remove usbss_mem. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/dma/cppi41.c | 18 ++ 1

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

2017-01-19 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 f6f2d84..cd30fd3 100644 --- a/drivers/dma/cppi41.c

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

2017-01-19 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 | 24 2 files changed, 27 insertions(+), 3 del

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

2017-01-19 Thread Alexandre Bailon
ed 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. Alexandre Bailon (3): dt/bindings: da

[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 3/5] usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx

2017-01-19 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 v3 0/5] usb: musb: da8xx: Add DMA support

2017-01-19 Thread Alexandre Bailon
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 (5): usb: musb: da8xx: Remove CPPI 3.0 quirk and metho

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

2017-01-19 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] 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 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_

[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 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

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

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 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 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] 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] 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 v2 1/4] dt/bindings: Add binding for the DA8xx MUSB driver

2016-10-26 Thread Alexandre Bailon
From: Petr Kulhavy <p...@barix.com> DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver. Signed-off-by: Petr Kulhavy <p...@barix.com> Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- .../devicetree/bindings/usb/da8xx-usb.txt | 43

[PATCH v2 4/4] ARM: dts: da850: Add the usb otg device node

2016-10-26 Thread Alexandre Bailon
This adds the device tree node for the usb otg controller present in the da850 family of SoC's. This also enables the otg usb controller for the lcdk board. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- arch/arm/boot/dts/da850-lcdk.dts | 8 arch/arm/boot/dts/da85

[PATCH v2 0/4] Add DT support for DA8xx

2016-10-26 Thread Alexandre Bailon
: * Remove unrelated changes in patch 3 * Rename the device node in patch 4 Alexandre Bailon (1): ARM: dts: da850: Add the usb otg device node Petr Kulhavy (3): dt/bindings: Add binding for the DA8xx MUSB driver usb: musb: core: added helper function for parsing DT usb: musb: da8xx: Add

[PATCH v2 2/4] usb: musb: core: added helper function for parsing DT

2016-10-26 Thread Alexandre Bailon
From: Petr Kulhavy <p...@barix.com> This adds the function musb_get_mode() to get the DT property "dr_mode" Signed-off-by: Petr Kulhavy <p...@barix.com> Acked-by: Sergei Shtylyov <sshtyl...@ru.mvista.com> Signed-off-by: Alexandre Bailon <abai...@baylibre.com>

[PATCH v2 3/4] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-10-26 Thread Alexandre Bailon
From: Petr Kulhavy <p...@barix.com> This adds DT support for TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver Signed-off-by: Petr Kulhavy <p...@barix.com> Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 47 +

Re: [PATCH v2 2/3] phy: da8xx-usb: Configure CFGCHIP2 to support OTG workaround

2016-10-26 Thread Alexandre Bailon
On 10/26/2016 05:40 PM, David Lechner wrote: > On 10/26/2016 05:58 AM, Alexandre Bailon wrote: >> If we configure the da8xx OTG phy in OTG mode, neither device or host >> mode will work. That is because the PHY is not able to detect and notify >> the driver that value of ID pi

[PATCH v3 2/4] usb: musb: core: added helper function for parsing DT

2016-10-27 Thread Alexandre Bailon
From: Petr Kulhavy <p...@barix.com> This adds the function musb_get_mode() to get the DT property "dr_mode" Signed-off-by: Petr Kulhavy <p...@barix.com> Acked-by: Sergei Shtylyov <sshtyl...@ru.mvista.com> Signed-off-by: Alexandre Bailon <abai...@baylibre.co

[PATCH v3 3/4] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-10-27 Thread Alexandre Bailon
From: Petr Kulhavy <p...@barix.com> This adds DT support for TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver Signed-off-by: Petr Kulhavy <p...@barix.com> Signed-off-by: Alexandre Bailon <abai...@baylibre.com> Tested-by: David Lechner <da...@lechnology.com> --- drive

[PATCH v3 1/4] dt/bindings: Add binding for the DA8xx MUSB driver

2016-10-27 Thread Alexandre Bailon
From: Petr Kulhavy <p...@barix.com> DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver. Signed-off-by: Petr Kulhavy <p...@barix.com> Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- .../devicetree/bindings/usb/da8xx-usb.txt | 43

[PATCH v3 4/4] ARM: dts: da850: Add the usb otg device node

2016-10-27 Thread Alexandre Bailon
This adds the device tree node for the usb otg controller present in the da850 family of SoC's. This also enables the otg usb controller for the lcdk board. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- arch/arm/boot/dts/da850-lcdk.dts | 8 arch/arm/boot/dts/da85

[PATCH v3 0/4] Add DT support for DA8xx

2016-10-27 Thread Alexandre Bailon
Changes in v2: * Remove unrelated changes in patch 3 * Rename the device node in patch 4 Changes in v3: * Fix few mistakes in DT binding sample * Only build the device table if DT is enabled Alexandre Bailon (1): ARM: dts: da850: Add the usb otg device node Petr Kulhavy (3): dt/bindings

[PATCH v5 1/4] usb: musb: da8xx: Call earlier clk_prepare_enable()

2016-11-07 Thread Alexandre Bailon
The first attempt to read a register may fail because the clock may not be enabled, and then the probe of musb driver will fail. Call clk_prepare_enable() before the first register read. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 17 --

[PATCH v5 4/4] usb: musb: da8xx: Set phy in OTG mode by default

2016-11-07 Thread Alexandre Bailon
The DA8xx OTG PHY has some issues when it is forced in host or peripheral mode. Actually, most of the time, OTG is the best mode because host or peripheral mode are only required for hardware that miss some circuitry. Init the PHY mode OTG mode by default. Signed-off-by: Alexandre Bailon <a

[PATCH v5 0/4] usb: musb: da8xx: Fix few issues

2016-11-07 Thread Alexandre Bailon
. Changes in v5: * Add the init argument to musb_platform_set_mode() and set_mode() callback. * Remove the quirk * Configure the DA8xx phy in OTG mode if da8xx_musb_set_mode() is called from init. Alexandre Bailon (4): usb: musb: da8xx: Call earlier clk_prepare_enable() phy: da8xx-usb: Configure

[PATCH v5 3/4] usb: musb: Add a new argument to musb_platform_set_mode()

2016-11-07 Thread Alexandre Bailon
argument to musb_platform_set_mode() in order to let the callback change its behavior if it is called during the init. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/am35x.c | 2 +- drivers/usb/musb/blackfin.c | 2 +- drivers/usb/musb/da8xx.c | 2 +- d

[PATCH v5 2/4] phy: da8xx-usb: Configure CFGCHIP2 to support OTG workaround

2016-11-07 Thread Alexandre Bailon
require the VBUS sense and the session end comparator to enabled. Enable them if the phy is configured in OTG mode. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/phy/phy-da8xx-usb.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/phy/phy-da8xx-usb.c b/drive

[PATCH 2/4] usb: musb: core: added helper function for parsing DT

2016-10-25 Thread Alexandre Bailon
From: Petr Kulhavy <p...@barix.com> This adds the function musb_get_mode() to get the DT property "dr_mode" Signed-off-by: Petr Kulhavy <p...@barix.com> Acked-by: Sergei Shtylyov <sshtyl...@ru.mvista.com> Signed-off-by: Alexandre Bailon <abai...@baylibre.com>

[PATCH 0/4] Add DT support for DA8xx

2016-10-25 Thread Alexandre Bailon
The purpose of this series is to add DT support to the da8xx USB OTG. This series should apply and build without any issues but it has some dependencies on "Add DT support for ohci-da8xx" series. Without it, the phy init will fail and then the da8xx driver will also fail. Alexandre

[PATCH 0/3] usb: musb: da8xx: Fix few issues

2016-10-25 Thread Alexandre Bailon
Currently, the USB OTG of the da8xx doesn't work. This series intend to fix them. Alexandre Bailon (3): usb: musb: da8xx: Only execute the OTG workaround when phy in OTG mode usb: musb: da8xx: Fixup the OTG workaround usb: musb: da8xx: Call earlier clk_prepare_enable() drivers/phy/phy

[PATCH 2/3] phy: da8xx-usb: Configure CFGCHIP2 to support OTG workaround

2016-10-25 Thread Alexandre Bailon
require the VBUS sense and the session end comparator to enabled. Enable them if the phy is configured in OTG mode. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/phy/phy-da8xx-usb.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drive

[PATCH 1/3] usb: musb: da8xx: Call earlier clk_prepare_enable()

2016-10-25 Thread Alexandre Bailon
The first attempt to read a register may fail because the clock may not be enabled, and then the probe of musb driver will fail. Call clk_prepare_enable() before the first register read. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 12 ++--

[PATCH 3/3] usb: musb: da8xx: Only execute the OTG workaround when phy in OTG mode

2016-10-25 Thread Alexandre Bailon
possible when the phy is in OTG mode. Only execute the workaround if the phy is in OTG mode. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/d

[PATCH 3/4] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-10-25 Thread Alexandre Bailon
From: Petr Kulhavy <p...@barix.com> This adds DT support for TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver Signed-off-by: Petr Kulhavy <p...@barix.com> Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/da8xx.c | 76 ++

[PATCH 4/4] ARM: dts: da850: Add the usb otg device node

2016-10-25 Thread Alexandre Bailon
This adds the device tree node for the usb otg controller present in the da850 family of SoC's. This also enables the otg usb controller for the lcdk board. Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- arch/arm/boot/dts/da850-lcdk.dts | 8 arch/arm/boot/dts/da85

[PATCH 1/4] dt/bindings: Add binding for the DA8xx MUSB driver

2016-10-25 Thread Alexandre Bailon
From: Petr Kulhavy <p...@barix.com> DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver. Signed-off-by: Petr Kulhavy <p...@barix.com> Signed-off-by: Alexandre Bailon <abai...@baylibre.com> --- .../devicetree/bindings/usb/da8xx-usb.txt | 43

Re: [PATCH/RFT v2 06/17] ARM: davinci: da8xx: Fix some redefined symbol warnings

2016-10-25 Thread Alexandre Bailon
On 10/25/2016 12:03 PM, Sekhar Nori wrote: > On Monday 24 October 2016 10:16 PM, ahas...@baylibre.com wrote: >> From: Alexandre Bailon <abai...@baylibre.com> >> >> Some macro for DA8xx CFGCHIP are defined in usb-davinci.h, >> but da8xx-cfgchip.h intend to replace

Re: [PATCH v5 3/4] usb: musb: Add a new argument to musb_platform_set_mode()

2016-11-14 Thread Alexandre Bailon
On 11/14/2016 06:36 PM, Bin Liu wrote: > Hi, > > On Mon, Nov 07, 2016 at 02:05:07PM +0100, Alexandre Bailon wrote: >> During the init, the driver will use musb_platform_set_mode() >> to configure the controller mode and the PHY mode. >> The PHY of DA8xx has some is

[PATCH 2/3] usb: musb: Add a quirk to preserve MUSB_DEVCTL during suspend

2016-11-28 Thread Alexandre Bailon
-by: Alexandre Bailon <abai...@baylibre.com> --- drivers/usb/musb/musb_core.c | 13 +++-- drivers/usb/musb/musb_core.h | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 9e22646..7e2cd98 100644 --- a/d

  1   2   3   >