Re: [PATCH 02/10] usb: musb: Fix idling after host mode by increasing autosuspend delay

2016-05-05 Thread Tony Lindgren
* Bin Liu [160505 08:04]: > Hi, > > On Thu, Apr 28, 2016 at 10:33:12AM -0700, Tony Lindgren wrote: > > Looks like at least 2430 glue won't idle reliably with the 200 ms > > autosuspend delay. This causes deeper idle states being blocked for > > the whole So

Re: [PATCH 0/2] musb_host: move DMA engine check from musb_tx_dma_set_mode_cppi_tusb() to its caller

2016-05-05 Thread Tony Lindgren
* Bin Liu [160504 14:10]: > Hi, > > On Wed, May 04, 2016 at 11:56:15PM +0300, Sergei Shtylyov wrote: > > Hello. > > > > On 05/04/2016 11:46 PM, Bin Liu wrote: > > > > Commit 754fe4a92c07 ("usb: musb: Remove ifdefs for TX DMA for > > musb_host.c") > > looks incomplete: the DMA engin

Re: [PATCH 04/10] usb: musb: Remove unnecessary shutdown function

2016-05-05 Thread Tony Lindgren
* Bin Liu [160505 12:22]: > > Do we know what to be fixed? If not, I think we can drop this FIXME. Yeah seems pointless.. I think the next patch drops it. Tony -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majo

Re: [PATCH 02/10] usb: musb: Fix idling after host mode by increasing autosuspend delay

2016-05-09 Thread Tony Lindgren
* Felipe Balbi [160505 23:49]: > > Hi, > > Bin Liu writes: > >> Does the current 200 ms autosuspend timeout relate to anything real > >> other than what I found out with my measurements? > > > > Not sure, I didn't checkk where the 200ms comes from. > > It was an arbitrary number from when runt

Re: [PATCH 00/10] Get MUSB PM runtime working again

2016-05-11 Thread Tony Lindgren
* Ivaylo Dimitrov [160503 10:46]: > On 3.05.2016 19:25, Tony Lindgren wrote: > >* Ivaylo Dimitrov [160430 23:34]: > >> > >>Unfortunately that makes my n900 unbootable with USB cable detached, see the > >>attached file (at [ 152.121673]) when there is US

[PATCH 04/15] usb: musb: Split PM runtime between wrapper IP and musb core

2016-05-11 Thread Tony Lindgren
ntime calls from the glue layer, those will get removed in a later patch. Signed-off-by: Tony Lindgren --- drivers/usb/musb/musb_core.c | 39 +-- drivers/usb/musb/omap2430.c | 10 -- 2 files changed, 17 insertions(+), 32 deletions(-) diff --git a/driver

[PATCH 02/15] usb: musb: Remove unnecessary shutdown function

2016-05-11 Thread Tony Lindgren
We have remove() already calling shutdown(), so let's drop it and move the code to remove(). No code changes, we'll drop the the FIXME in the following patch with more clean-up. Signed-off-by: Tony Lindgren --- drivers/usb/musb/musb_core.c | 39 ++---

[PATCH 09/15] usb: musb: Remove try_idle for 2430 glue layer

2016-05-11 Thread Tony Lindgren
This is no longer needed with PM runtime at least for 2430 glue. We can now rely only on PM runtime and cable detection. The other glue layers can probably remove try_idle too, but that needs to be tested for each platform before doing it. Signed-off-by: Tony Lindgren --- drivers/usb/musb

[PATCH 15/15] usb: phy: Check initial state for twl6030

2016-05-11 Thread Tony Lindgren
We need to check the state for the PHY with delayed_work as otherwise MUSB will get confused and idles immediately. Signed-off-by: Tony Lindgren --- drivers/usb/phy/phy-twl6030-usb.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy

[PATCH 01/15] usb: musb: Fix idling after host mode by increasing autosuspend delay

2016-05-11 Thread Tony Lindgren
eeded by the hardware based negotiation between MUSB and the PHY. Signed-off-by: Tony Lindgren --- drivers/usb/musb/musb_core.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 39fd958..460176c 100644

[PATCHv2 00/15] Get MUSB PM runtime working again

2016-05-11 Thread Tony Lindgren
Hi all, Here's the whole series reposted with a bunch of additional changes. It seems to now properly work with with multiple phy cable status events, and should work for Ivaylo on n900 too. Please re-review and re-test. Regards, Tony Tony Lindgren (15): usb: musb: Fix idling after

[PATCH 06/15] usb: musb: Use delayed for musb_gadget_pullup

2016-05-11 Thread Tony Lindgren
e_irq_safe. Note that we may want to set this up in a generic way in the gadget framework eventually. Signed-off-by: Tony Lindgren --- drivers/usb/musb/musb_core.h | 1 + drivers/usb/musb/musb_gadget.c | 24 ++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff

[PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-11 Thread Tony Lindgren
it in omap2430_musb_enable(). Signed-off-by: Tony Lindgren --- drivers/usb/musb/omap2430.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 79e4cd7..958ae6a 100644 --- a/drivers/usb/musb/omap2430.c

[PATCH 08/15] usb: musb: Improve PM runtime and phy handling for 2430 glue layer

2016-05-11 Thread Tony Lindgren
This simplifies things and allows idling both MUSB and PHY when nothing is configured. Let's just return early from PM runtime if musb is not yet initialized. Let's also warn if PHY is not configured. Signed-off-by: Tony Lindgren --- drivers/usb/musb/omap2

[PATCH 14/15] usb: musb: Use normal module_init for 2430 glue

2016-05-11 Thread Tony Lindgren
There's no longer any need for custom initcall level for musb. Signed-off-by: Tony Lindgren --- drivers/usb/musb/omap2430.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 97bd365..ab0f0f0 1

[PATCH 13/15] usb: musb: Remove pm_runtime_set_irq_safe

2016-05-11 Thread Tony Lindgren
With the pull up being handled with delayed work, we can now finally remove pm_runtime_set_irq_safe that blocks the MUSB glue from idling. Signed-off-by: Tony Lindgren --- drivers/usb/musb/musb_core.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b

[PATCH 11/15] usb: musb: Return error value from musb_mailbox

2016-05-11 Thread Tony Lindgren
change from the initial state. To do this, let's add a return value to musb_mailbox(), and reset cached linkstat to MUSB_UNKNOWN on error. Sorry to cause a bit of churn here, I should have added that already last time patching musb_mailbox(). Signed-off-by: Tony Lindgren --- drivers/ph

[PATCH 03/15] usb: musb: Update to use PM runtime autosuspend

2016-05-11 Thread Tony Lindgren
e that we'll be removing the PM runtime calls from the glue layer to the MUSB core in the next patch. And we can also remove the pointless FIXME comment now. Signed-off-by: Tony Lindgren --- drivers/usb/musb/musb_core.c | 9 ++--- drivers/usb/musb/musb_gadget.c | 3 ++- drivers/usb/musb/omap24

[PATCH 12/15] usb: musb: Remove extra PM runtime calls from 2430 glue layer

2016-05-11 Thread Tony Lindgren
With PM runtime behaving, these are all now unnecessary. Doing pm_runtime_get(musb->controller) will keep the parent glue layer also active. Signed-off-by: Tony Lindgren --- drivers/usb/musb/omap2430.c | 28 1 file changed, 4 insertions(+), 24 deletions(-) d

[PATCH 05/15] usb: musb: Remove conditional PM runtime calls for musb_gadget

2016-05-11 Thread Tony Lindgren
rest. Signed-off-by: Tony Lindgren --- drivers/usb/musb/musb_gadget.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index fff5a8a..7ecc893 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb

[PATCH 07/15] usb: musb: Handle cable status better for 2430 glue layer

2016-05-11 Thread Tony Lindgren
to keep track of the power state. Signed-off-by: Tony Lindgren --- drivers/usb/musb/omap2430.c | 68 +++-- 1 file changed, 60 insertions(+), 8 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 3ce94bf..02d40bc 100644

Re: [PATCH 07/15] usb: musb: Handle cable status better for 2430 glue layer

2016-05-11 Thread Tony Lindgren
* Tony Lindgren [160511 17:56]: > We may have drivers loaded but no configured gadgets and MUSB may be in > host mode. If gadgets are configured during host mode, PM runtime will > get confused. ... > @@ -307,6 +350,9 @@ static void omap_musb_set_mailbox(struct omap2430_g

Re: [PATCH 07/15] usb: musb: Handle cable status better for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Bin Liu [160513 12:58]: > On Wed, May 11, 2016 at 06:33:04PM -0700, Tony Lindgren wrote: > > --- a/drivers/usb/musb/omap2430.c > > +++ b/drivers/usb/musb/omap2430.c > > @@ -49,6 +49,9 @@ struct omap2430_glue { > > enum musb_vbus_id_status status;

Re: [PATCH 07/15] usb: musb: Handle cable status better for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Bin Liu [160513 13:26]: > On Fri, May 13, 2016 at 03:21:55PM -0500, Bin Liu wrote: > > On Fri, May 13, 2016 at 01:09:02PM -0700, Tony Lindgren wrote: > > > * Bin Liu [160513 12:58]: > > > > On Wed, May 11, 2016 at 06:33:04PM -0700, Tony Lindgren wrote: > > &

Re: [PATCH 07/15] usb: musb: Handle cable status better for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Bin Liu [160513 13:43]: > Hi, > > On Fri, May 13, 2016 at 01:33:30PM -0700, Tony Lindgren wrote: > > * Bin Liu [160513 13:26]: > > > On Fri, May 13, 2016 at 03:21:55PM -0500, Bin Liu wrote: > > > > On Fri, May 13, 2016 at 01:09:02PM -0700, Tony Lindgren wr

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Bin Liu [160513 14:05]: > Hi, > > On Wed, May 11, 2016 at 05:53:11PM -0700, Tony Lindgren wrote: > > At least 2430 glue layer pulls d+ high on start up even if there are > > no gadgets configured. This is bad at least for anything using a separate > > battery charger

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Bin Liu [160513 14:24]: > Hi, > > On Fri, May 13, 2016 at 02:17:39PM -0700, Tony Lindgren wrote: > > * Bin Liu [160513 14:05]: > > > Hi, > > > > > > On Wed, May 11, 2016 at 05:53:11PM -0700, Tony Lindgren wrote: > > > > At least 2430

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Bin Liu [160513 15:04]: > > But what would be in musb_default_set_mode()? Currently only am35x, > da8xx, dsps, and omap2430 glues implement _set_mode(), but they don't > have any in common. Only omap2430 sets session bit in _set_mode(), no > one else does so. Well how about the following if no

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Tony Lindgren [160513 14:19]: > * Bin Liu [160513 14:05]: > > In stead of removing it, session bit should only be set when musb_mode > > == MUSB_HOST, will this fix the D+ pullup problem? > > Good point, I forgot about it being specific to host mode. I'll check.

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-16 Thread Tony Lindgren
* Bin Liu [160516 07:17]: > Hi, > > On Sat, May 14, 2016 at 04:30:32PM +0300, Sergei Shtylyov wrote: > > On 5/14/2016 12:03 AM, Bin Liu wrote: > > > > >>At least 2430 glue layer pulls d+ high on start up even if there are > > >>no gadgets configured. This is bad at least for anything using a sep

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-16 Thread Tony Lindgren
* Bin Liu [160514 21:44]: > Hi, > > On Fri, May 13, 2016 at 03:25:17PM -0700, Tony Lindgren wrote: > > * Bin Liu [160513 15:04]: > > > > > > But what would be in musb_default_set_mode()? Currently only am35x, > > > da8xx, dsps, and omap2430 g

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-16 Thread Tony Lindgren
* Bin Liu [160516 08:24]: > Hi, > > On Mon, May 16, 2016 at 07:57:57AM -0700, Tony Lindgren wrote: > > * Bin Liu [160516 07:17]: > > > Hi, > > > > > > On Sat, May 14, 2016 at 04:30:32PM +0300, Sergei Shtylyov wrote: > > > > On 5/14/2016 12:

Re: [PATCHv2 00/15] Get MUSB PM runtime working again

2016-05-17 Thread Tony Lindgren
* Bin Liu [160517 14:17]: > Hi Tony, > > On Wed, May 11, 2016 at 05:53:01PM -0700, Tony Lindgren wrote: > > Hi all, > > > > Here's the whole series reposted with a bunch of additional changes. > > It seems to now properly work with with multiple phy cable

Re: [PATCHv2 00/15] Get MUSB PM runtime working again

2016-05-18 Thread Tony Lindgren
* Bin Liu [160517 15:06]: > On Tue, May 17, 2016 at 02:54:04PM -0700, Tony Lindgren wrote: > > > s/pm_runtime_put/pm_runtime_put_sync/ will fix it. I'm wondering why > > it breaks though as dsps glue does not use autosuspend? It could also > > I am not familiar wit

Re: [PATCHv2 00/15] Get MUSB PM runtime working again

2016-05-18 Thread Tony Lindgren
* Bin Liu [160518 10:37]: > I think I found the problem. Before having the offending patch, > musb_gadget_pullup() got called by musb_gadget_start(), then pm_suspend > immediately (~2us) happens, and musb_save_context() backs up DEVCTL register > which has session bit set. > > But with the offend

Re: [PATCHv2 00/15] Get MUSB PM runtime working again

2016-05-18 Thread Tony Lindgren
* Alan Stern [160518 11:47]: > On Wed, 18 May 2016, Tony Lindgren wrote: > > > * Bin Liu [160518 10:37]: > > > I think I found the problem. Before having the offending patch, > > > musb_gadget_pullup() got called by musb_gadget_start(), then pm_suspend > &g

Re: [PATCHv2 00/15] Get MUSB PM runtime working again

2016-05-19 Thread Tony Lindgren
Hi, * Bin Liu [160518 11:12]: > On Wed, May 18, 2016 at 11:07:37AM -0700, Tony Lindgren wrote: > > > > Is this with or without the $subject series? > > Without. OK sounds like you have a fix coming for that issue. > > > I tried to enable some dynamic-debug

Re: [PATCHv2 00/15] Get MUSB PM runtime working again

2016-05-19 Thread Tony Lindgren
* Tony Lindgren [160519 08:28]: > +static void dsps_musb_set_power(struct musb *musb, bool enabled) > +{ > + struct dsps_glue *glue = dev_get_drvdata(musb->controller->parent); > + int err; > + > + if (enabled == glue->powered) { > + dev

Re: [OOPS] cppi41_dma_channel_program: Unable to handle kernel NULL pointer dereference

2016-05-23 Thread Tony Lindgren
ou mind to add your Reported-by in the patch? > > Sure, please add > > Reported-by: Matwey V. Kornilov Looks good to me too, sorry for the nasty typo: Acked-by: Tony Lindgren -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Nokia N900: musb is in wrong state after boot

2016-06-08 Thread Tony Lindgren
* Pali Rohár [160607 05:53]: > > Tony, what do you think about that patch? > > > > Tony, PING Yeah I don't know, AFAIK we don't have a generic way to force MUSB to change mode without ID pin. If you have figured something generic for that which does not actually tinker with the PHY registers di

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Tony Lindgren
* Felipe Balbi [160621 03:06]: > 8<-- > vbus = read(VBUS_STATE); /* could be a gpio_get_value() */ > id = read(ID_STATE); /* could be a gpio_get_value() */ > > set_role(id); > set_vbus(vbus); We sho

Re: [PATCH v2 13/22] mfd: omap-usb-host: override number of ports from platform data

2012-11-28 Thread Tony Lindgren
13 deletions(-) Note that plat/usb.h is now include/linux/platform_data/usb-omap.h in linux next so you need to coordinate with that. For the arch/arm/*omap*/* parts: Acked-by: Tony Lindgren > diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c > index 3c43449

Re: [PATCH v2 18/22] mfd: omap-usb-host: get rid of cpu_is_omap..() macros

2012-11-28 Thread Tony Lindgren
linux next. Other than that: Acked-by: Tony Lindgren > Signed-off-by: Roger Quadros > CC: Tony Lindgren > --- > arch/arm/mach-omap2/usb-host.c|4 > arch/arm/plat-omap/include/plat/usb.h |3 +++ > drivers/mfd/omap-usb-host.c |3 +-- &g

Re: [RFC PATCH 4/5] arm: omap2: support port power on lan95xx devices

2012-12-05 Thread Tony Lindgren
Hi, * Ming Lei [121202 07:05]: > --- a/arch/arm/mach-omap2/board-omap4panda.c > +++ b/arch/arm/mach-omap2/board-omap4panda.c ... > + > +static struct notifier_block usb_port_nb = { > + .notifier_call = device_notify, > +}; > + We'll be flipping omap4 over to be device tree only soon. So le

Re: [PATCH v3 01/23] mfd: omap-usb-host: get rid of cpu_is_omap..() macros

2012-12-05 Thread Tony Lindgren
his series with scripts/get_maintainer.pl to see who all should be cc:ed? Regards, Tony > Signed-off-by: Roger Quadros > CC: Tony Lindgren > --- > arch/arm/mach-omap2/usb-host.c |4 > drivers/mfd/omap-usb-host.c|2 +- > include/linux/platform_data/us

Re: [PATCH v4 01/23] mfd: omap-usb-host: get rid of cpu_is_omap..() macros

2012-12-13 Thread Tony Lindgren
r v3.8 presumably. Want to ack this one? Regards, Tony > > Signed-off-by: Roger Quadros > CC: Tony Lindgren > --- > arch/arm/mach-omap2/usb-host.c |4 > drivers/mfd/omap-usb-host.c|2 +- > include/linux/platform_data/usb-omap.h |

Re: [PATCH v4 16/23] ARM: OMAP2+: clock data: Merge utmi_px_gfclk into usb_host_hs_utmi_px_clk

2012-12-14 Thread Tony Lindgren
* Roger Quadros [121210 02:23]: > There is no such clock as utmi_p1_gfclk. It is only a clock selector > bit to select th the parent of usb_host_hs_utmi_p1_clk. > So we get rid of utmi_p1_gfclk and utmi_p2_gfclk by merging them into > usb_host_hs_utmi_p1_clk and usb_host_hs_utmi_p2_clk respectivel

Re: [PATCH v4 01/23] mfd: omap-usb-host: get rid of cpu_is_omap..() macros

2012-12-14 Thread Tony Lindgren
* Samuel Ortiz [121213 16:57]: > Hi Tony, > > On Thu, Dec 13, 2012 at 01:49:49PM -0800, Tony Lindgren wrote: > > Hi Samuel, > > > > * Roger Quadros [121210 02:23]: > > > Instead of using cpu_is_omap..() macros in the device driver we > > > rely

Re: MUSB-HDRC Gadget driving VBUS inappropriately

2012-12-14 Thread Tony Lindgren
* Ian Coolidge [121214 01:55]: > Hi, > > We're using Linux 3.3 on DM3730 with TPS6595xx PMIC for an embedded product. > For a particular board, we have musb-hdrc (RTL 1.4) configured in peripheral > mode. > We use the Ethernet gadget configured for cdc_eem to use Ethernet emulation > over USB f

Re: [PATCH 01/14] mfd: omap-usb-host: Consolidate OMAP USB-HS platform data

2013-01-10 Thread Tony Lindgren
* Roger Quadros [130110 08:54]: > Let's have a single platform data structure for the OMAP's High-Speed > USB host subsystem instead of having 3 separate ones i.e. one for > board data, one for USB Host (UHH) module and one for USB-TLL module. > > This makes the code much simpler and avoids creat

Re: [PATCH 01/14] mfd: omap-usb-host: Consolidate OMAP USB-HS platform data

2013-01-11 Thread Tony Lindgren
* Roger Quadros [130111 01:43]: > Tony, > > On 01/11/2013 01:45 AM, Tony Lindgren wrote: > > * Roger Quadros [130110 08:54]: > >> Let's have a single platform data structure for the OMAP's High-Speed > >> USB host subsystem instead of having 3 separate

Re: [PATCH 01/14] mfd: omap-usb-host: Consolidate OMAP USB-HS platform data

2013-01-14 Thread Tony Lindgren
* Roger Quadros [130114 03:31]: > On 01/11/2013 08:13 PM, Tony Lindgren wrote: > > * Roger Quadros [130111 01:43]: > >> Tony, > >> > >> On 01/11/2013 01:45 AM, Tony Lindgren wrote: > >>> * Roger Quadros [130110 08:54]: > >>>> Let&#x

Re: [PATCH v7 01/22] mfd: omap-usb-host: Consolidate OMAP USB-HS platform data

2013-01-17 Thread Tony Lindgren
* Alan Stern [130117 07:19]: > On Thu, 17 Jan 2013, Roger Quadros wrote: > > > Let's have a single platform data structure for the OMAP's High-Speed > > USB host subsystem instead of having 3 separate ones i.e. one for > > board data, one for USB Host (UHH) module and one for USB-TLL module. > >

Re: [PATCH v7 19/22] ARM: OMAP3: clock data: get rid of unused USB host clock aliases and dummies

2013-01-17 Thread Tony Lindgren
* Roger Quadros [130117 03:34]: > We don't need multiple aliases for the OMAP USB host clocks and neither > the dummy clocks so remove them. It's best that Paul queues this and the next patch as these clock alias clean-up patches can be done separately. That way the dependency between arch/arm/*o

Re: [PATCH v7 19/22] ARM: OMAP3: clock data: get rid of unused USB host clock aliases and dummies

2013-01-17 Thread Tony Lindgren
* Paul Walmsley [130117 14:33]: > On Thu, 17 Jan 2013, Felipe Balbi wrote: > > > do you mean v3.9 ? > > It sounds like the other patches need to be merged first before these > cleanups can be merged. So rather than adding a merge order dependency > during 3.9, it seems best to queue the non-e

Re: [PATCH] usb: musb: mark PM functions as __maybe_unused

2016-11-23 Thread Tony Lindgren
the suspend/resume > functions as __maybe_unused will do the right thing without warning. OK works for me: Acked-by: Tony Lindgren -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at h

Re: [PATCH 0/4] musb fixes for v4.9-rc cycle

2016-11-23 Thread Tony Lindgren
* Tomi Valkeinen [161123 07:54]: > On 23/11/16 17:49, Laurent Pinchart wrote: > > Hi Tomi, > > > > On Wednesday 23 Nov 2016 12:14:17 Tomi Valkeinen wrote: > >> On 10/11/16 23:25, Laurent Pinchart wrote: > >> [2.766174] musb_bus_suspend 2586: trying to suspend as a_idle while > >> acti

Re: [PATCH 0/4] musb fixes for v4.9-rc cycle

2016-11-23 Thread Tony Lindgren
* Tomi Valkeinen [161123 08:13]: > On 23/11/16 17:57, Tony Lindgren wrote: > > * Tomi Valkeinen [161123 07:54]: > >> On 23/11/16 17:49, Laurent Pinchart wrote: > >>> Hi Tomi, > >>> > >>> On Wednesday 23 Nov 2016 12:14:17 Tomi Valkeinen w

Re: [PATCH 0/4] musb fixes for v4.9-rc cycle

2016-11-23 Thread Tony Lindgren
* Tomi Valkeinen [161123 08:40]: > On 23/11/16 18:34, Tony Lindgren wrote: > > > OK. And what changes to your current .config make the musb_bus_suspend() > > issues show up? > > > > If it happens with USB-B cable from host to musb with musb set to host > >

[PATCH] usb: musb: Fix trying to free already-free IRQ 4

2016-11-23 Thread Tony Lindgren
[] (musb_remove+0xf0/0x12c [musb_hdrc]) [] (musb_remove [musb_hdrc]) from [] (platform_drv_remove+0x24/0x3c) ... This is because the irq number in use is 260 nowadays, and the dma controller is using u8 instead of int. Signed-off-by: Tony Lindgren --- Found one more issue.. This has been around

[PATCH] usb: dwc3: omap: Fix imprecise external abort and oops on boot

2016-12-07 Thread Tony Lindgren
-by: Tony Lindgren --- drivers/usb/dwc3/dwc3-omap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c @@ -511,6 +511,8 @@ static int dwc3_omap_probe(str

Re: [PATCH 0/4] musb fixes for v4.9-rc cycle

2016-12-07 Thread Tony Lindgren
* Laurent Pinchart [161123 08:44]: > Hello, > > On Wednesday 23 Nov 2016 18:40:09 Tomi Valkeinen wrote: > > On 23/11/16 18:34, Tony Lindgren wrote: > > > OK. And what changes to your current .config make the musb_bus_suspend() > > > issues show up? > >

Re: [PATCH] usb: dwc3: omap: Fix imprecise external abort and oops on boot

2016-12-08 Thread Tony Lindgren
* Felipe Balbi [161208 01:45]: > > Hi, > > Tony Lindgren writes: > > Somehow starting with v4.9-rc7 there have been imprecise > > There's nothing touching dwc3 since v4.9-rc5. Right, nothing obvious has changed. I think it's just a slight timing change in t

Re: [PATCH] usb: dwc3: omap: Fix imprecise external abort and oops on boot

2016-12-08 Thread Tony Lindgren
* Felipe Balbi [161208 09:52]: > > Hi, > > Tony Lindgren writes: > > * Felipe Balbi [161208 01:45]: > >> > >> Hi, > >> > >> Tony Lindgren writes: > >> > Somehow starting with v4.9-rc7 there have been imprecise > >>

Re: [PATCH] usb: dwc3: omap: Fix imprecise external abort and oops on boot

2016-12-08 Thread Tony Lindgren
* Tony Lindgren [161208 10:25]: > * Felipe Balbi [161208 09:52]: > > > > Hi, > > > > Tony Lindgren writes: > > > * Felipe Balbi [161208 01:45]: > > >> > > >> Hi, > > >> > > >> Tony Lindgren writes: >

Re: [PATCH 0/4] musb fixes for v4.9-rc cycle

2016-12-08 Thread Tony Lindgren
* Laurent Pinchart [161208 04:03]: > Hi Tony, > > On Wednesday 07 Dec 2016 21:51:23 Tony Lindgren wrote: > > * Laurent Pinchart [161123 08:44]: > > > On Wednesday 23 Nov 2016 18:40:09 Tomi Valkeinen wrote: > > >> On 23/11/16 18:34, Tony Lindgren wrote:

Re: [PATCH] usb: dwc3: omap: Fix imprecise external abort and oops on boot

2016-12-08 Thread Tony Lindgren
* Tony Lindgren [161208 10:45]: > * Tony Lindgren [161208 10:25]: > > * Felipe Balbi [161208 09:52]: > > > > > > Hi, > > > > > > Tony Lindgren writes: > > > > * Felipe Balbi [161208 01:45]: > > > >> > > >

Re: [PATCH] usb: dwc3: omap: Fix imprecise external abort and oops on boot

2016-12-08 Thread Tony Lindgren
* Felipe Balbi [161208 11:19]: > > Hi, > > Tony Lindgren writes: > >> Is there also some dwc3 internal clock? If we assume the usb_otg_ss > >> module is properly enabled it could be some dwc3 internal clock not > >> enabled? > >> > &

Re: [PATCH] usb: dwc3: omap: Fix imprecise external abort and oops on boot

2016-12-08 Thread Tony Lindgren
* Felipe Balbi [161208 11:17]: > Tony Lindgren writes: > > The call to pm_runtime_get_sync() in dwc3_omap_probe() will use it. > > right, but there's no runtime suspend until ->remove(). IOW, after > pm_runtime_get_sync(), all necessary clocks should already be

Re: [PATCH] usb: dwc3: omap: Fix imprecise external abort and oops on boot

2016-12-08 Thread Tony Lindgren
* Felipe Balbi [161208 12:12]: > > Hi, > > Tony Lindgren writes: > > * Felipe Balbi [161208 11:17]: > >> Tony Lindgren writes: > >> > The call to pm_runtime_get_sync() in dwc3_omap_probe() will use it. > >> > >> right, bu

Re: [PATCH] usb: dwc3: omap: Fix imprecise external abort and oops on boot

2016-12-08 Thread Tony Lindgren
* Felipe Balbi [161208 12:10]: > > Hi, > > Tony Lindgren writes: > >> nothing against it. Would be nice if TI could confirm this is needed and > >> check if other families might also need it. > > > > But as we currently are not using the WRAPRESET bit

Re: [PATCH] usb: dwc3: omap: Fix imprecise external abort and oops on boot

2016-12-08 Thread Tony Lindgren
* Grygorii Strashko [161208 13:54]: > Hi Tony, > > On 12/08/2016 09:37 AM, Tony Lindgren wrote: > > * Felipe Balbi [161208 01:45]: > >> Tony Lindgren writes: > >>> Somehow starting with v4.9-rc7 there have been imprecise > >> > >> There&

Re: [PATCH] usb: dwc3: omap: Fix imprecise external abort and oops on boot

2016-12-08 Thread Tony Lindgren
* Grygorii Strashko [161208 15:38]: > On 12/08/2016 04:57 PM, Tony Lindgren wrote: > > Seems to work based on few boot tests. Probably both should be applied, > > my original patch to prevent spurious interrupts before things are > > initialized, > > you patch - do you

Re: [PATCH] usb: dwc3: omap: Fix imprecise external abort and oops on boot

2016-12-09 Thread Tony Lindgren
* Roger Quadros [161209 08:09]: > Hi Tony, > > On 08/12/16 05:21, Tony Lindgren wrote: > > Somehow starting with v4.9-rc7 there have been imprecise > > external aborts on omap5-uevm dwc3 controller. I have not been > > able to bisect what exactly triggered this as it

Re: [PATCH] usb: dwc3: omap: remove devm_request_threaded_irq

2016-12-09 Thread Tony Lindgren
* Grygorii Strashko [161209 12:55]: > Switch back from devm_request_threaded_irq() to request_threaded_irq() to > avoid races between interrupt handler execution and PM runtime in error > handling code path in probe and in dwc3_omap_remove(): Can't you just call disable_irq() on the exit path ins

Re: [PATCH] usb: dwc3: omap: remove devm_request_threaded_irq

2016-12-09 Thread Tony Lindgren
* Grygorii Strashko [161209 14:46]: > > > On 12/09/2016 03:59 PM, Tony Lindgren wrote: > > * Grygorii Strashko [161209 12:55]: > > > Switch back from devm_request_threaded_irq() to request_threaded_irq() to > > > avoid races between interrupt handler

Re: [PATCH] usb: dwc3: omap: remove devm_request_threaded_irq

2016-12-09 Thread Tony Lindgren
* Grygorii Strashko [161209 15:32]: > > > On 12/09/2016 05:04 PM, Tony Lindgren wrote: > > * Grygorii Strashko [161209 14:46]: > >> > >> > >> On 12/09/2016 03:59 PM, Tony Lindgren wrote: > >>> * Grygorii Strashko [161209 12:55]:

Re: [PATCH v2] usb: dwc3: omap: fix race of pm runtime with irq handler in probe

2016-12-12 Thread Tony Lindgren
may still run > of_platform_depopulate(omap->dev); > pm_runtime_put_sync(&pdev->dev); > ^^ PM runtime can race with IRQ handler > pm_runtime_disable(&pdev->dev); > > return 0; > > So, OMAP DWC3 IRQ need to be disabled before calling > pm_

Re: [PATCH] usb: musb: debugfs: allow forcing host mode together with speed in testmode

2016-12-14 Thread Tony Lindgren
* Pali Rohár [161214 06:48]: We need this because and this allows debugging problems related to ...? Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/ma

Re: [PATCH] usb: musb: debugfs: allow forcing host mode together with speed in testmode

2016-12-14 Thread Tony Lindgren
* Pali Rohár [161214 07:40]: > On Wednesday 14 December 2016 16:34:31 Tony Lindgren wrote: > > * Pali Rohár [161214 06:48]: > > > > We need this because and this allows debugging problems related > > to ...? > > Hi! We have already discussion abou

Re: [PATCH] usb: musb: fix runtime PM in debugfs

2016-12-20 Thread Tony Lindgren
* Bin Liu [161219 12:46]: > MUSB driver now has runtime PM support, but the debugfs driver misses > the PM _get/_put() calls, which could cause MUSB register access > failure. Acked-by: Tony Lindgren -- To unsubscribe from this list: send the line "unsubscribe linux-usb&quo

Re: [PATCH 0/4] musb fixes for v4.9-rc cycle

2016-12-20 Thread Tony Lindgren
* Ladislav Michl [161220 10:41]: > Hi Laurent, > > On Sat, Nov 12, 2016 at 03:21:24AM +0200, Laurent Pinchart wrote: > > Hi Bin, > > > > http://pandaboard.org/sites/default/files/board_reference/ES/750-2170-002-sch_revb.pdf > > > > It would seem that the voltage is provided by the TWL6030. I'm

Re: [PATCH 03/16] usb: musb: Fix trying to free already-free IRQ 4

2017-01-03 Thread Tony Lindgren
* Bin Liu [170103 10:35]: > Tony, > > On Tue, Jan 03, 2017 at 04:36:14PM +0100, Greg KH wrote: > > On Tue, Jan 03, 2017 at 09:15:08AM -0600, Bin Liu wrote: > > > From: Tony Lindgren > > > > > > When unloading omap2430, we can get the following splat

Re: [PATCH] USB: ohci-omap: defer probe if PHY is missing

2017-01-04 Thread Tony Lindgren
* Aaro Koskinen [170103 12:13]: > On Tue, Jan 03, 2017 at 08:05:04PM +0100, Greg Kroah-Hartman wrote: > > I'm not objecting to this patch, just really curious why no one else has > > ever hit it. > > Maybe I'm the only user... I still have 770 in my test rack :) I don't boot it much though as it

[PATCH] usb: musb: Add support for optional VBUS irq to dsps glue layer

2017-01-05 Thread Tony Lindgren
rface when the am335x internal PM coprocessor provides us with an IRQ chip. For now, we still need to poll for the host mode status. Signed-off-by: Tony Lindgren --- drivers/usb/musb/musb_dsps.c | 114 ++- 1 file changed, 90 insertions(+), 24 deletions(-)

Re: [PATCH] usb: musb: Add support for optional VBUS irq to dsps glue layer

2017-01-05 Thread Tony Lindgren
* Tony Lindgren [170105 11:14]: > We can now configure the PMIC interrupt to provide us VBUS > events. In that case we don't need to constantly poll the > status and can make it optional. This is only wired up > for the mini-B interface on beaglebone. > > Note that eventu

Re: [PATCH v2 1/2] dmaengine: cppi41: Fix list not empty warning on runtime suspend

2017-01-09 Thread Tony Lindgren
Hi, * Alexandre Bailon [170109 09:04]: > Sometime, a transfer may not be queued due to a race between runtime pm > and cppi41_dma_issue_pending(). > Sometime, cppi41_runtime_resume() may be interrupted right before to > update device PM state to RESUMED. > When it happens, if a new dma transfer i

Re: [PATCH v2 2/2] dmaengine: cppi41: Ignore EINPROGRESS for PM runtime in interrupt handler

2017-01-09 Thread Tony Lindgren
* Alexandre Bailon [170109 09:04]: > We can occasionally get -EINPROGRESS for pm_runtime_get. > This is happening when an interrupt is fired before PM runtime had time > to update the PM state to RESUMED. > In that case, don't print any error. Hmm if the cppi41 interrupt fires, the device has res

Re: [PATCH 1/4] usb: musb: da8xx: Use the right dma controller

2017-01-09 Thread Tony Lindgren
* Sergei Shtylyov [170109 10:30]: > Hello! > > On 01/09/2017 07:38 PM, Alexandre Bailon wrote: > > > da8xx driver is registering and using the cppi dma controller but actually, > > the da8xx has a cppi41 dma controller. > > Update the driver to register and use the cppi41 dma controller. > > >

Re: [PATCH 1/4] usb: musb: da8xx: Use the right dma controller

2017-01-09 Thread Tony Lindgren
* Sergei Shtylyov [170109 10:55]: > On 01/09/2017 09:43 PM, Tony Lindgren wrote: > > > > > da8xx driver is registering and using the cppi dma controller but > > > > actually, > > > > the da8xx has a cppi41 dma controller. > > > > Update th

Re: [PATCH 08/11] dmaengine: cppi41: Implement the glue for da8xx

2017-01-10 Thread Tony Lindgren
* Alexandre Bailon [170110 07:23]: > On 01/10/2017 11:05 AM, Sekhar Nori wrote: > > On DA8xx, CPPI 4.1 DMAengine is not an independent system resource, but > > embedded within the USB 2.0 controller. So, I think all that is needed > > is for MUSB DA8xx glue to trigger probe of CPPI 4.1 dmaengine d

Re: [PATCH] usb: musb: Add support for optional VBUS irq to dsps glue layer

2017-01-11 Thread Tony Lindgren
* Bin Liu [170111 05:42]: > On Tue, Jan 10, 2017 at 01:53:53PM -0600, Bin Liu wrote: > > On Thu, Jan 05, 2017 at 11:12:59AM -0800, Tony Lindgren wrote: > > > We can now configure the PMIC interrupt to provide us VBUS > > > events. In that case we don't need to cons

Re: [PATCH v2 1/2] dmaengine: cppi41: Fix list not empty warning on runtime suspend

2017-01-12 Thread Tony Lindgren
* Tony Lindgren [170109 10:35]: > Hi, > > * Alexandre Bailon [170109 09:04]: > > Sometime, a transfer may not be queued due to a race between runtime pm > > and cppi41_dma_issue_pending(). > > Sometime, cppi41_runtime_resume() may be interrupted right before to &g

Re: [PATCH v2 1/2] dmaengine: cppi41: Fix list not empty warning on runtime suspend

2017-01-12 Thread Tony Lindgren
* Grygorii Strashko [170112 09:24]: > On 01/12/2017 11:09 AM, Tony Lindgren wrote: > > Below is what seems to fix issues for me, not seeing any more warnings > > either. > > > > Care to give it a try with your USB headset? > > This looks more close to what is p

Re: [PATCH v2 1/2] dmaengine: cppi41: Fix list not empty warning on runtime suspend

2017-01-12 Thread Tony Lindgren
* Alexandre Bailon [170112 09:42]: > This solves the issue but I still have a bad playback quality. > I don't remember if I have spoken about it so I will describe it. > When I play audio (with your patch or mine), the music cut a lot. > The issue go away when the MUSB driver is built in PIO mode

[PATCH] dmaengine: cppi41: Fix oops in cppi41_runtime_resume

2017-01-12 Thread Tony Lindgren
v Reported-by: Alexandre Bailon Signed-off-by: Tony Lindgren --- drivers/dma/cppi41.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c --- a/drivers/dma/cppi41.c +++ b/drivers/dma/cppi41.c @@ -1,3 +1,4 @@ +#incl

[PATCHv2] usb: musb: Add support for optional VBUS irq to dsps glue layer

2017-01-12 Thread Tony Lindgren
rface when the am335x internal PM coprocessor provides us with an IRQ chip. For now, we still need to poll for the host mode status. Signed-off-by: Tony Lindgren --- Changes since v1: - Updated based on comments from Bin mostly to limit to peripheral mode only --- drivers/usb/musb/musb_dsps.c

Re: [PATCH] dmaengine: cppi41: Fix oops in cppi41_runtime_resume

2017-01-12 Thread Tony Lindgren
* Grygorii Strashko [170112 13:54]: > On 01/12/2017 03:30 PM, Tony Lindgren wrote: > > Sry, but even if it looks better it might still race with PM runtime :( > > > - if (likely(pm_runtime_active(cdd->ddev.dev))) > > + if (likely(atomic_read(&cdd->active)))

Re: [PATCH] dmaengine: cppi41: Fix oops in cppi41_runtime_resume

2017-01-12 Thread Tony Lindgren
* Grygorii Strashko [170112 14:53]: > > > On 01/12/2017 04:19 PM, Tony Lindgren wrote: > > * Grygorii Strashko [170112 13:54]: > >> On 01/12/2017 03:30 PM, Tony Lindgren wrote: > >> > >> Sry, but even if it looks better it might still race

Re: [PATCH] dmaengine: cppi41: Fix oops in cppi41_runtime_resume

2017-01-12 Thread Tony Lindgren
* Grygorii Strashko [170112 15:43]: > @@ -457,38 +449,36 @@ static void push_desc_queue(struct cppi41_channel *c) > cppi_writel(reg, cdd->qmgr_mem + QMGR_QUEUE_D(c->q_num)); > } > > -static void pending_desc(struct cppi41_channel *c) > +static void cppi41_dma_issue_pending(struct dma_ch

  1   2   3   4   5   6   7   8   >