[PATCH v2 18/20] usb: dwc2: Reduce delay when forcing mode in reset

2015-12-17 Thread John Youn
The delay for force mode is only 25ms according to the databook. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 097fd9f..73f2771

[PATCH v2 09/20] usb: dwc2: Add dwc2_core_reset()

2015-12-17 Thread John Youn
dwc2_core_reset() was previously renamed to dwc2_core_reset_and_dr_force_mode(). Now add back dwc2_core_reset() which performs only a basic core reset without forcing the mode. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 22 -- drive

[PATCH v2 16/20] usb: dwc2: gadget: Use hw params from core

2015-12-17 Thread John Youn
Use the previously cached hw params in the gadget. This saves a reset and force mode in the gadget initialization during probe and makes getting the hardware parameters consistent between gadget and host. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.

Re: [PATCH 15/18] usb: dwc2: Improve handling of host and device hwparams

2015-12-16 Thread John Youn
On 12/16/2015 8:08 AM, Felipe Balbi wrote: > > Hi > > John Youn <john.y...@synopsys.com> writes: >> On 12/10/2015 2:55 PM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> John Youn <john.y...@synopsys.com> writes: >>&

Re: [PATCH] usb: dwc2: fix transfer stop programming for out endpoint

2015-12-16 Thread John Youn
c IN NAK. This driver bug leads the out-ep >> failed be in disabled state with below error. >> >> dwc2_hsotg_ep_stop_xfr: timeout DOEPCTL.EPDisable >> >> Signed-off-by: Du, Changbin <changbin...@intel.com> > > John, is this patch okay to apply ? > Ye

Re: [PATCH] usb: dwc2: gadget: don't overwrite DCTL register on NAKEFF interrupts

2015-12-16 Thread John Youn
>> Signed-off-by: Gregory Herrero <gregory.herr...@intel.com> > > John, are you okay with this patch ? > Acked-by: John Youn <johny...@synopsys.com> John -- 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: poweroff-issue with dwc2 on Felipe's testing/next branch

2015-12-15 Thread John Youn
On 12/15/2015 3:49 PM, Heiko Stübner wrote: > Hi, > > it seems the recent dwc2 additions to the testing/next branch [0] caused > some interesting issue for me. > > Setting is a regular 4.4-rc3/4 (only with some display-stuff added), and the > testing/next branch merged in. > > If I attach a

Re: [PATCH 18/18] usb: dwc2: Reduce delay when forcing mode in reset

2015-12-10 Thread John Youn
On 12/9/2015 8:45 PM, Doug Anderson wrote: > John, > > On Wed, Dec 2, 2015 at 11:15 AM, John Youn <john.y...@synopsys.com> wrote: >> The delay for force mode is only 25ms according to the databook. >> >> Signed-off-by: John Youn <johny...@synopsys.com>

Re: [PATCH 15/18] usb: dwc2: Improve handling of host and device hwparams

2015-12-10 Thread John Youn
On 12/9/2015 8:45 PM, Doug Anderson wrote: > John, > > On Wed, Dec 2, 2015 at 11:15 AM, John Youn <john.y...@synopsys.com> wrote: >> This commit adds separate functions for getting the host and device >> specific hardware params. These functions check whether the pa

Re: [PATCH 15/18] usb: dwc2: Improve handling of host and device hwparams

2015-12-10 Thread John Youn
On 12/10/2015 2:55 PM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >>> Interesting. You're getting a new parameter that's never been needed >>> in the code before and (as far as I can tell) isn't used anywhere in >>

Re: [PATCH 13/18] usb: dwc2: Move reset into dwc2_get_hwparams()

2015-12-09 Thread John Youn
On 12/9/2015 4:46 PM, Doug Anderson wrote: > John, > > On Wed, Dec 2, 2015 at 11:14 AM, John Youn <john.y...@synopsys.com> wrote: >> The reset is required to get reset values of the hardware parameters but >> the force mode is not. Move the base reset into dwc2_get_hwp

[PATCH 17/18] usb: dwc2: gadget: Remove force device mode

2015-12-02 Thread John Youn
The forcing of device mode is not needed in the gadget init. This is already taken care of in the probe just before this is called. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/us

[PATCH 18/18] usb: dwc2: Reduce delay when forcing mode in reset

2015-12-02 Thread John Youn
The delay for force mode is only 25ms according to the databook. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 91d63a8..a6fddbf

[PATCH 09/18] usb: dwc2: Add dwc2_core_reset()

2015-12-02 Thread John Youn
dwc2_core_reset() was previously renamed to dwc2_core_reset_and_force_mode(). Now add back dwc2_core_reset() which performs only a basic core reset without forcing the mode. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 22 ++ drivers/us

[PATCH 06/18] usb: dwc2: Avoid more calls to dwc2_core_reset()

2015-12-02 Thread John Youn
<diand...@chromium.org> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 40 +++- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 9bf354d..c4af353 100644

[PATCH 02/18] usb: dwc2: reset dwc2 core before dwc2_get_hwparams()

2015-12-02 Thread John Youn
..@chromium.org> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 2 +- drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/platform.c | 6 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.

[PATCH 08/18] usb: dwc2: Rename dwc2_core_reset()

2015-12-02 Thread John Youn
Renamed dwc2_core_reset() to dwc2_core_reset_and_force_mode(). This describes what it is doing more accurately. This is in preparation of introducing a plain dwc2_core_reset() function that only performs the reset and doesn't force the mode. Signed-off-by: John Youn <johny...@synopsys.

[PATCH 00/18] usb: dwc2: Reduce probe delays

2015-12-02 Thread John Youn
Appreciate testing on other platforms. Regards, John Douglas Anderson (4): usb: dwc2: Restore GUSBCFG in dwc2_get_hwparams() usb: dwc2: Avoid double-reset at boot time usb: dwc2: Speed dwc2_get_hwparams() on some host-only ports usb: dwc2: Avoid more calls to dwc2_core_reset() John Youn

[PATCH 07/18] usb: dwc2: Reorder AHBIDLE and CSFTRST in dwc2_core_reset()

2015-12-02 Thread John Youn
According to the databook, the core soft reset should be done before checking for AHBIDLE. The gadget version of core reset had it correct but the hcd version did not. This fixes the hcd version. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.

[PATCH 01/18] usb: dwc2: Restore GUSBCFG in dwc2_get_hwparams()

2015-12-02 Thread John Youn
omium.org> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 66523fa..7198f4e 100644 --- a/drivers/usb/dwc2/core.c +++

[PATCH 04/18] usb: dwc2: Speed dwc2_get_hwparams() on some host-only ports

2015-12-02 Thread John Youn
get_hwparams(). Signed-off-by: Douglas Anderson <diand...@chromium.org> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index

[PATCH 14/18] usb: dwc2: Add functions to set and clear force mode

2015-12-02 Thread John Youn
Added functions to set force mode for host and device. These functions will check the current mode and only force if needed. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 54 + 1 file changed, 54 insertions(+)

[PATCH 16/18] usb: dwc2: gadget: Use the common dwc2_core_reset()

2015-12-02 Thread John Youn
The gadget was using its own version of core reset. Use the common one in core.c. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 52 ++- 1 file changed, 2 insertions(+), 50 deletions(-) diff --git a/drivers/us

[PATCH 15/18] usb: dwc2: Improve handling of host and device hwparams

2015-12-02 Thread John Youn
This commit adds separate functions for getting the host and device specific hardware params. These functions check whether the parameters need to be read at all, depending on dr_mode, and they force the mode only if necessary. This saves some delays during probe. Signed-off-by: John Youn <jo

[PATCH 03/18] usb: dwc2: Avoid double-reset at boot time

2015-12-02 Thread John Youn
_phy was always set at exactly the same times we could avoid the reset, we remove "irq" and rename "select_phy" to "initial_setup" and adjust the callers accordingly. Signed-off-by: Douglas Anderson <diand...@chromium.org> Signed-off-by: John Youn &l

[PATCH 13/18] usb: dwc2: Move reset into dwc2_get_hwparams()

2015-12-02 Thread John Youn
The reset is required to get reset values of the hardware parameters but the force mode is not. Move the base reset into dwc2_get_hwparams() and do the reset and force mode afterwards. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 5 + drivers/us

[PATCH 10/18] usb: dwc2: Add functions to check the HW OTG config

2015-12-02 Thread John Youn
Added functions to query the GHWCFG2.OTG_MODE. This tells us whether the controller hardware is configured for OTG, device-only, or host-only. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 37 + drivers/usb/dwc2/core.

[PATCH 12/18] usb: dwc2: Move mode querying functions into core.h

2015-12-02 Thread John Youn
These functions should go in core.h where they can be called from core, device, or host. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 12 drivers/usb/dwc2/hcd.h | 12 2 files changed, 12 insertions(+), 12 deletions(-) diff

[PATCH 05/18] usb: dwc2: reduce dwc2 driver probe time

2015-12-02 Thread John Youn
e ? I have tried this patch in my RK3288-evb board. It works well. Signed-off-by: Yunzhi Li <l...@rock-chips.com> Signed-off-by: Douglas Anderson <diand...@chromium.org> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 10 +- 1 file cha

[PATCH 11/18] usb: dwc2: Fix dr_mode validation

2015-12-02 Thread John Youn
: DEV OTG HST any: HST OTG DEV any: DEV OTG OTG any: dr_mode Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/platform.c | 79 ++--- 1 file changed, 67 insertions(+), 12 deletions(-) diff --git a/d

Re: [PATCH 0/2] Two fix for dwc2 gadget driver

2015-12-02 Thread John Youn
On 11/29/2015 9:29 PM, changbin...@intel.com wrote: > From: "Du, Changbin" > > With the first patch, enable a enabled ep will return -EBUSY. > The second patch forbid queuing on disabled ep to avoid panic. The usb_ep->enabled flag was added in 4.4. It looks like these

Re: [PATCH v5] usb: of: add an api to get dr_mode by the phy node

2015-11-20 Thread John Youn
On 11/20/2015 1:38 PM, Bin Liu wrote: > hi, > > On 11/20/2015 03:35 PM, Felipe Balbi wrote: >> >> Hi, >> >> Bin Liu writes: >> +enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_np); >>bool of_usb_host_tpl_support(struct device_node *np); >>int

Re: [PATCH v5] usb: of: add an api to get dr_mode by the phy node

2015-11-20 Thread John Youn
On 11/3/2015 9:49 AM, Bin Liu wrote: > Some USB phy drivers have different handling for the controller in each > dr_mode. But the phy driver does not have visibility to the dr_mode of > the controller. > > This adds an api to return the dr_mode of the controller which > associates the given phy

Re: [PATCH v5] usb: of: add an api to get dr_mode by the phy node

2015-11-20 Thread John Youn
On 11/20/2015 1:19 PM, John Youn wrote: > On 11/3/2015 9:49 AM, Bin Liu wrote: >> Some USB phy drivers have different handling for the controller in each >> dr_mode. But the phy driver does not have visibility to the dr_mode of >> the controller. >> >> This

Re: [PATCH v5 1/2] usb: dwc2: host: Add missing spinlock in dwc2_hcd_reset_func()

2015-11-20 Thread John Youn
;dev, "USB RESET function called\n"); > + > + spin_lock_irqsave(>lock, flags); > + > hprt0 = dwc2_read_hprt0(hsotg); > hprt0 &= ~HPRT0_RST; > dwc2_writel(hprt0, hsotg->regs + HPRT0); > hsotg->flags.b.port_reset_change = 1; > + >

Re: [PATCH v5 2/2] usb: dwc2: host: Clear interrupts before handling them

2015-11-20 Thread John Youn
gt; + dwc2_writel(hprt0_modify | HPRT0_ENACHG, hsotg->regs + HPRT0); > dev_vdbg(hsotg->dev, >" --Port Interrupt HPRT0=0x%08x Port Enable Changed > (now %d)--\n", >hprt0, !!(hprt0 &a

Re: [PATCH] usb: dwc2: add support of hi6220

2015-11-19 Thread John Youn
On 11/19/2015 11:04 AM, Felipe Balbi wrote: > > Hi, > > Zhangfei Gao writes: >> Support hisilicon,hi6220-usb for HiKey board >> >> Signed-off-by: Zhangfei Gao > > doesn't apply: > > Applying: usb: dwc2: add support of hi6220 > error:

Re: [PATCH v3 6/8] usb: dwc2: host: Assume all devices are on one single_tt hub

2015-11-19 Thread John Youn
: Giveback URB in tasklet context > > I'll probably move these back up in the series (like in v2) and put > microframe rewrite atop them. With my current understanding the > scheduling is so broken today that the concerns Alan brought up can > wait until we have a proper scheduler to be a

Re: [PATCH v2 2/2] usb: dwc2: host: Clear interrupts before handling them

2015-11-18 Thread John Youn
On 11/16/2015 9:22 AM, Doug Anderson wrote: > Felipe, > > On Mon, Nov 16, 2015 at 8:28 AM, Felipe Balbi wrote: >> >> Hi, >> >> Douglas Anderson writes: >>> In general it is wise to clear interrupts before processing them. If >>> you don't do that, you can

Re: [PATCH] usb: dwc2: add support of hi6220

2015-11-18 Thread John Youn
= 0,/* 1.3 */ > @@ -282,6 +313,7 @@ static int dwc2_driver_remove(struct platform_device *dev) > > static const struct of_device_id dwc2_of_match_table[] = { > { .compatible = "brcm,bcm2835-usb", .data = _bcm2835 }, > + { .compatible = &qu

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread John Youn
On 11/16/2015 3:14 PM, Doug Anderson wrote: > Alan, > > On Mon, Nov 16, 2015 at 12:31 PM, Alan Stern > wrote: >> On Mon, 16 Nov 2015, Doug Anderson wrote: >> >>> Alan, >>> >>> On Mon, Nov 16, 2015 at 11:31 AM, Alan Stern >>> wrote: On

Re: usb: dwc2: regression during boot on Raspberry Pi

2015-11-12 Thread John Youn
On 11/11/2015 11:13 PM, Stefan Wahren wrote: > Am 12.11.2015 um 05:39 schrieb John Youn: >> On 11/11/2015 3:20 PM, Stefan Wahren wrote: >>> Hi John, >>> >>> Am 11.11.2015 um 00:21 schrieb John Youn: >>>> On 11/9/2015 12:43 PM, Stefan Wahren wro

Re: [PATCH 0/4 V2] usb: dwc2: fix usb host support on Raspberry Pi

2015-11-12 Thread John Youn
gt; - extend "usb: dwc2: Return errors from PHY" to handle kernel > without PHY support > - take care of Sergei Shtylyov comments > - add patch to make otg clk optional again > > John Youn (1): > usb: dwc2: Make PHY optional > > Stefan Wahren (3): >

Re: [RFC] usb: dwc2: hcd: fix split schedule issue

2015-11-12 Thread John Youn
On 11/11/2015 8:46 PM, Doug Anderson wrote: > John, > > On Wed, Nov 11, 2015 at 8:29 PM, John Youn <john.y...@synopsys.com> wrote: >> I also feel it is not quite right as the SSPLIT should be able to >> happen during the SSPLIT of another device. I tried to re

Re: [REPOST PATCH] usb: dwc2: host: Support immediate retries for split transactions

2015-11-12 Thread John Youn
} > > chan->start_pkt_count = num_packets; > @@ -1855,8 +1866,7 @@ void dwc2_hc_start_transfer(struct dwc2_hsotg *hsotg, > > hcchar = dwc2_readl(hsotg->regs + HCCHAR(chan->hc_num)); > hcchar &= ~HCCHAR_MULTICNT_MASK; > - hcchar |= chan->multi_coun

Re: [RFC] usb: dwc2: hcd: fix split schedule issue

2015-11-11 Thread John Youn
On 11/11/2015 4:22 PM, Doug Anderson wrote: > John, > > On Fri, Nov 6, 2015 at 2:04 AM, Yunzhi Li wrote: >> hi John , >> >> As we talked yesterday, I tried to fix the split schedule sequence. This >> patch will >> avoid scheduling SSPLIT-IN packet for another device

Re: usb: dwc2: regression during boot on Raspberry Pi

2015-11-11 Thread John Youn
On 11/11/2015 3:20 PM, Stefan Wahren wrote: > Hi John, > > Am 11.11.2015 um 00:21 schrieb John Youn: >> On 11/9/2015 12:43 PM, Stefan Wahren wrote: >>> Hi, >> >> The gadget side required it but it looks like the host side >> didn't. >> &

[PATCH RESEND 0/2] usb: dwc2: Fix issues with getting PHY during probe

2015-11-11 Thread John Youn
This series address a couple issues with setting up and checking the PHY during probe. Resending to linux-usb list with fixed up headers and fixed cover letter subject. John Youn (2): usb: dwc2: Make PHY optional usb: dwc2: Return errors from PHY drivers/usb/dwc2/platform.c | 36

[PATCH RESEND 1/2] usb: dwc2: Make PHY optional

2015-11-11 Thread John Youn
host side and broke some platforms when it was moved into platform.c. The gadget doesn't require the PHY either so remove the check. Reported-by: Stefan Wahren <i...@lategoodbye.de> Cc: Marek Szyprowski <m.szyprow...@samsung.com> Signed-off-by: John Youn <johny...@synopsys.com> ---

Re: usb: dwc2: regression during boot on Raspberry Pi

2015-11-11 Thread John Youn
On 11/11/2015 9:57 AM, Alexander Aring wrote: > Hi, > > On Tue, Nov 10, 2015 at 11:21:56PM +0000, John Youn wrote: >> On 11/9/2015 12:43 PM, Stefan Wahren wrote: >>> Hi, >>> >>> Am 09.11.2015 um 12:53 schrieb Marek Szyprowski: >>>> Hello, &

[PATCH RESEND 2/2] usb: dwc2: Return errors from PHY

2015-11-11 Thread John Youn
<alex.ar...@gmail.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/platform.c | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index b129c52..0a

Re: usb: dwc2: regression during boot on Raspberry Pi

2015-11-11 Thread John Youn
On 11/8/2015 2:13 AM, Stefan Wahren wrote: > Hi Stephen, > > Am 08.11.2015 um 06:06 schrieb Stephen Warren: >> On 11/07/2015 05:16 PM, Stefan Wahren wrote: >>> Hi, >>> [...] >>>* phys (optional) >>>* phy-names (optional) >>> >>> So here are my questions: >>> >>> How to fix the kernel oops

Re: usb: dwc2: regression during boot on Raspberry Pi

2015-11-10 Thread John Youn
On 11/9/2015 12:43 PM, Stefan Wahren wrote: > Hi, > > Am 09.11.2015 um 12:53 schrieb Marek Szyprowski: >> Hello, >> >> >> This change looks reasonable, I remember the similar issue was in >> s3c-hsotg driver >> and it caused kernel ops on driver probe, when bootloader left dwc2 >> enabled. >> The

Re: [PATCH] USB: DCW3: GADGET: Set Correct Max Speed

2015-11-09 Thread John Youn
On 11/9/2015 1:09 PM, Felipe Balbi wrote: > > Hi, > > "McCauley, Ben" writes: >>> "McCauley, Ben" writes: >> Ben is talking about setting the gadget->max_speed, which is >> hard-coded in dwc3 to USB_SPEED_SUPER. >> >> For this

Re: [PATCH] USB: DCW3: GADGET: Set Correct Max Speed

2015-11-06 Thread John Youn
On 11/6/2015 9:55 AM, Felipe Balbi wrote: > > Hi, > > "McCauley, Ben" writes: >> Felipe, >> >> -Original Message- >> From: Felipe Balbi [mailto:ba...@ti.com] >> Sent: Friday, November 06, 2015 10:06 AM >> To: McCauley, Ben >> Cc:

Re: [PATCH v2 00/13] usb: dwc2: descriptor dma mode bug fixes

2015-11-05 Thread John Youn
-- > drivers/usb/dwc2/core.h | 26 + > drivers/usb/dwc2/hcd.c | 76 +- > drivers/usb/dwc2/hcd.h | 19 > drivers/usb/dwc2/hcd_ddma.c | 240 > +++ > drivers/usb/dwc2/hcd_intr.c | 15 ++- > drivers/usb/dwc2

Re: [PATCH v1 10/14] usb: dwc2: host: free status_buf on hcd de-init

2015-11-04 Thread John Youn
On 10/12/2015 2:18 AM, Gregory Herrero wrote: > status_buf needs to be freed in dwc2_hcd_remove(). > > Signed-off-by: Gregory Herrero > --- > drivers/usb/dwc2/hcd.c | 19 ++- > 1 file changed, 18 insertions(+), 1 deletion(-) > > diff --git

Re: [PATCH] RFT: usb: dwc2: bus suspend/resume that's not hibernate

2015-11-04 Thread John Youn
On 10/30/2015 1:33 PM, Douglas Anderson wrote: > This is an attempt to rehash commit 0cf884e819e0 ("usb: dwc2: add bus > suspend/resume for dwc2") on ToT. That commit was reverted in commit > b0bb9bb6ce01 ("Revert "usb: dwc2: add bus suspend/resume for dwc2"") > because apparently it broke the

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-04 Thread John Youn
enumerate. > > Signed-off-by: Douglas Anderson <diand...@chromium.org> > --- > Changes in v2: > - Don't reconnect when called from _dwc2_hcd_stop() (John Youn) > > drivers/usb/dwc2/core.h | 6 -- > drivers/usb/dwc2/core_intr.c | 4 ++-- > drivers/usb/dwc2/h

Re: [PATCH v2 2/2] usb: dwc2: host: Clear interrupts before handling them

2015-11-04 Thread John Youn
2_hsotg *hsotg) >* Clear if detected - Set internal flag if disabled >*/ > if (hprt0 & HPRT0_ENACHG) { > + writel(hprt0_modify | HPRT0_ENACHG, hsotg->regs + HPRT0); > dev_vdbg(hsotg->dev, >&q

Re: [PATCH 1/2] usb: dwc2: host: Fix missing device insertions

2015-10-30 Thread John Youn
On 10/16/2015 3:10 PM, Douglas Anderson wrote: > If you've got your interrupt signals bouncing a bit as you insert your > USB device, you might end up in a state when the device is connected but > the driver doesn't know it. > > Specifically, the observed order is: > 1. hardware sees connect >

Re: [PATCH] usb: dwc2: host: Fix remote wakeup when not in DWC2_L2

2015-10-29 Thread John Youn
>> --- >> drivers/usb/dwc2/hcd.c | 9 + >> 1 file changed, 5 insertions(+), 4 deletions(-) > > I know I've sent up a lot of patches recently, but this one in > particular would be good to get tested, reviewed, and landed sooner > rather than later. I believe it fixe

Re: [PATCH] usb: dwc2: host: Fix ahbcfg for rk3066

2015-10-26 Thread John Youn
LEN_SHIFT, > .uframe_sched = -1, > .external_id_pin_ctl= -1, > .hibernation= -1, > Acked-by: John Youn <johny...@synopsys.com> John -- 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: [PATCHv2] usb: dwc2: use devm_phy_optional_get

2015-10-26 Thread John Youn
USB PHY when devm_phy_get returns -ENOENT Should be -ENODEV > only. Other values like > -EPROBE_DEFER need to be returned from the probe function, because it > could be that a phy is specified but not probed before. > > Suggested-by: Uwe Kleine-König <u.kleine-koe...@pengutro

Re: [REPOST PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288

2015-10-26 Thread John Youn
On 10/21/2015 9:23 AM, Doug Anderson wrote: > John, > > On Mon, Jul 6, 2015 at 11:27 AM, Douglas Anderson > wrote: >> This series of patches, together with >> from Chris Zhong and a >> dts change allow us to wake up from a USB

Re: [PATCH] usb: dwc2: host: Protect PCGCTL with lock in dwc2_port_resume()

2015-10-16 Thread John Youn
e(>lock, flags); > usleep_range(2, 4); > + spin_lock_irqsave(>lock, flags); > } > > - spin_lock_irqsave(>lock, flags); > hprt0 = dwc2_read_hprt0(hsotg); > hprt0 |= HPRT0_RES; > hprt0 &= ~HPRT0_SUSP; >

Re: [PATCH v2] usb: dwc2: host: Fix use after free w/ simultaneous irqs

2015-10-16 Thread John Youn
On 10/15/2015 4:38 PM, Doug Anderson wrote: > John, > > On Thu, Oct 15, 2015 at 4:21 PM, John Youn <john.y...@synopsys.com> wrote: >> Passing a NULL qtd to some of the subcases will lead to a NULL >> pointer dereference in that function or some function that it >&g

Re: [ANNOUNCE] tree closed for v4.4 merge window

2015-10-16 Thread John Youn
On 10/15/2015 8:32 AM, Felipe Balbi wrote: > > Hi guys, > > it's already -rc5 and I need to close my tree for this merge > window. Major fixes will still be queued. I still have 3 patches on DWC2 > pending John's Ack, so those are the last ones which will get into my > tree; after that, only bug

Re: [PATCH v2] usb: dwc2: host: Fix use after free w/ simultaneous irqs

2015-10-15 Thread John Youn
On 10/14/2015 3:51 PM, Douglas Anderson wrote: > While plugging / unplugging on a DWC2 host port with "slub_debug=FZPUA" > enabled, I found a crash that was quite obviously a use after free. > > It appears that in some cases when we handle the various sub-cases of > HCINT we may end up freeing

Re: [PATCH] Revert "usb: dwc3: gadget: remove unnecessary _irqsave()"

2015-10-13 Thread John Youn
On 10/13/2015 9:05 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> On 10/12/2015 12:25 PM, Felipe Balbi wrote: >>> This reverts commit 70f3a9caa11665e9f9aace581d85d8483716a4c8. >>> >>> T

Re: [PATCH] usb: dwc2: fix duplicate argument warning

2015-10-12 Thread John Youn
NT | > - GINTSTS_DISCONNINT; > + intmsk |= GINTSTS_DISCONNINT | GINTSTS_PRTINT | GINTSTS_HCHINT; > dwc2_writel(intmsk, hsotg->regs + GINTMSK); > } > > Acked-by: John Youn <johny...@synopsys.com> John -- To unsubscrib

Re: [PATCH v2] usb: dwc2: reset dwc2 core before dwc2_get_hwparams()

2015-10-09 Thread John Youn
On 10/7/2015 5:50 PM, Doug Anderson wrote: > John, > > On Mon, Oct 5, 2015 at 3:02 PM, John Youn <john.y...@synopsys.com> wrote: >> On 10/1/2015 1:50 PM, Doug Anderson wrote: >>> John, >>> >>> On Tue, Aug 18, 2015 at 5:19 PM, John Youn <john.y..

Re: [PATCH v5 2/2] usb: dwc2: refactor common low-level hw code to platform.c

2015-10-06 Thread John Youn
no longer needed > > v4: > - fixed broken conditional compilation and adjusted comments in dwc2_hsotg > structure documentation > > v3: > - rebased onto latest 'testing/next' from Felipe Balbi (includes > s3c_hsotg -> dwc2 rename) > > v2: > - moved setting

[PATCH v2 3/7] usb: dwc3: pci: Add the PCI Product ID for Synopsys USB 3.1

2015-10-05 Thread John Youn
This adds the PCI product ID for the Synopsys USB 3.1 IP core (DWC_usb31) on a HAPS-based PCI development platform. Cc: <sta...@vger.kernel.org> # v3.18+ Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/dwc3-pci.c | 5 + 1 file changed, 5 insertions(+)

[PATCH v2 4/7] usb: dwc3: pci: Add platform data for Synopsys HAPS

2015-10-05 Thread John Youn
Add platform data and set usb3_lpm_capable and has_lpm_erratum. Cc: <sta...@vger.kernel.org> # v3.18+ Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/dwc3-pci.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b

[PATCH v2 0/7] Various updates for Synopsys platforms

2015-10-05 Thread John Youn
platform mostly mass-storage and CV and some internal testing. v2: * Updated the way the revisions are handled for 3.1 * Split up the dis_enblslpm_quirk patch John Youn (7): usb: dwc3: Support Synopsys USB 3.1 IP usb: dwc3: pci: Add the Synopsys HAPS AXI Product ID usb: dwc3: pci: Add

[PATCH v2 2/7] usb: dwc3: pci: Add the Synopsys HAPS AXI Product ID

2015-10-05 Thread John Youn
This ID is for the Synopsys DWC_usb3 core with AXI interface on PCIe HAPS platform. This core has the debug registers mapped at a separate BAR in order to support enhanced hibernation. Cc: <sta...@vger.kernel.org> # v3.18+ Signed-off-by: John Youn <johny...@synopsys.com> --- driv

[PATCH v2 1/7] usb: dwc3: Support Synopsys USB 3.1 IP

2015-10-05 Thread John Youn
the revision numbering scheme. Any future revision checks (for STARS, workarounds, and new features) should take into consideration how it applies to both the 3.1/3.0 IP. Cc: <sta...@vger.kernel.org> # v3.18+ Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3

[PATCH v2 5/7] usb: dwc3: Add dis_enblslpm_quirk

2015-10-05 Thread John Youn
Add a quirk to clear the GUSB2PHYCFG.ENBLSLPM bit, which controls whether the PHY receives the suspend signal from the controller. Cc: <sta...@vger.kernel.org> # v3.18+ Signed-off-by: John Youn <johny...@synopsys.com> --- Documentation/devicetree/bindings/usb/dwc3.txt | 2 ++ driv

Re: [PATCH v2] usb: dwc2: reset dwc2 core before dwc2_get_hwparams()

2015-10-05 Thread John Youn
On 10/1/2015 1:50 PM, Doug Anderson wrote: > John, > > On Tue, Aug 18, 2015 at 5:19 PM, John Youn <john.y...@synopsys.com> wrote: >> Hi Yunzhi, >> >> My concern is with the delays due to calling the dwc2_core_reset >> during probe. You could factor out the a

[PATCH v2 6/7] usb: dwc3: pci: Set enblslpm quirk for Synopsys platforms

2015-10-05 Thread John Youn
Certain Synopsys prototyping PHY boards are not able to meet timings constraints for LPM. This allows the PHY to meet those timings by leaving the PHY clock running during suspend. Cc: <sta...@vger.kernel.org> # v3.18+ Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/u

[PATCH v2 7/7] usb: dwc3: pci: trivial: Formatting

2015-10-05 Thread John Youn
Fix the alignment of the PCI device definitions. Also change the hex digit capitalization of one constant to make it consistent with the rest of the file and driver. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/dwc3-pci.c | 16 1 file chan

Re: [PATCH v4 4/4] usb: dwc2: refactor common low-level hw code to platform.c

2015-10-05 Thread John Youn
ted comments in dwc2_hsotg > structure documentation > > v3: > - rebased onto latest 'testing/next' from Felipe Balbi (includes > s3c_hsotg -> dwc2 rename) > > v2: > - moved setting of ll_hw_enabled flag to enable/disable functions, > as suggested by John Youn >

Re: mass storage behaviour

2015-10-05 Thread John Youn
Hi Paul, Good to see you're still hanging around. On 10/5/2015 3:38 PM, Paul Zimmerman wrote: > On Mon, 5 Oct 2015, Alan Stern wrote: >> On Mon, 5 Oct 2015, Paul Jones wrote: >> Increasing the max_sectors_kb value, on the other hand, might remove overhead by allowing a higher

Re: [PATCH 1/6] usb: dwc3: Support Synopsys USB 3.1 IP

2015-10-02 Thread John Youn
On 10/1/2015 8:09 PM, John Youn wrote: > On 10/1/2015 7:03 PM, Felipe Balbi wrote: >> Hi, >> >> On Fri, Sep 04, 2015 at 07:15:10PM -0700, John Youn wrote: >>> + >>> +/* DWC_usb31 revisions */ >>> +#define DWC3_USB31_REVISION_110A 0x3131302a >

Re: [PATCH 1/6] usb: dwc3: Support Synopsys USB 3.1 IP

2015-10-02 Thread John Youn
On 10/2/2015 7:05 AM, Felipe Balbi wrote: > HBi, > > On Fri, Oct 02, 2015 at 03:09:57AM +0000, John Youn wrote: >> On 10/1/2015 7:03 PM, Felipe Balbi wrote: >>> Hi, >>> >>> On Fri, Sep 04, 2015 at 07:15:10PM -0700, John Youn wrote: >>>> This p

Re: [PATCH 1/6] usb: dwc3: Support Synopsys USB 3.1 IP

2015-10-02 Thread John Youn
On 10/2/2015 5:33 PM, Felipe Balbi wrote: > On Sat, Oct 03, 2015 at 12:02:54AM +0200, Greg KH wrote: >> On Fri, Oct 02, 2015 at 02:21:01PM -0500, Felipe Balbi wrote: We're trying to avoid the situation where where we have to ship patches or maintain a separate kernel tree. Do

Re: [PATCH v3 4/4] usb: dwc2: refactor common low-level hw code to platform.c

2015-10-01 Thread John Youn
On 10/1/2015 8:50 AM, Felipe Balbi wrote: > On Mon, Sep 21, 2015 at 12:16:12PM +0200, Marek Szyprowski wrote: >> DWC2 module on some platforms needs three additional hardware >> resources: phy controller, clock and power supply. All of them must be >> enabled/activated to properly initialize and

Re: [PATCH v3 4/4] usb: dwc2: refactor common low-level hw code to platform.c

2015-10-01 Thread John Youn
On 10/1/2015 3:04 PM, Felipe Balbi wrote: > On Thu, Oct 01, 2015 at 09:04:59PM +0000, John Youn wrote: >> On 10/1/2015 8:50 AM, Felipe Balbi wrote: >>> On Mon, Sep 21, 2015 at 12:16:12PM +0200, Marek Szyprowski wrote: >>>> DWC2 module on some platforms n

[PATCH] usb: dwc2: gadget: parity fix in isochronous mode

2015-10-01 Thread John Youn
by: Scott Branden <sbran...@broadcom.com> Signed-off-by: John Youn <johny...@synopsys.com> --- Hi Roman, Scott, I have updated this patch for slave mode ISOC OUT and rebased against latest code. It shouldn't affect your platform in dma mode but just in case could you try it and make su

[PATCH 1/6] usb: dwc3: Support Synopsys USB 3.1 IP

2015-10-01 Thread John Youn
checks may not sync-up across future versions. >From now, any check based on a revision (for STARS, workarounds, and new features) should take into consideration how it applies to both the 3.1/3.0 IP and make the check accordingly. Cc: <sta...@vger.kernel.org> # v3.18+ Signed-off-by:

[PATCH 4/6] usb: dwc3: pci: Add platform data for Synopsys HAPS

2015-10-01 Thread John Youn
Add platform data and set usb3_lpm_capable and has_lpm_erratum. Cc: <sta...@vger.kernel.org> # v3.18+ Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/dwc3-pci.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b

[PATCH 2/6] usb: dwc3: pci: Add the Synopsys HAPS AXI Product ID

2015-10-01 Thread John Youn
This ID is for the Synopsys DWC_usb3 core with AXI interface on PCIe HAPS platform. This core has the debug registers mapped at a separate BAR in order to support enhanced hibernation. Cc: <sta...@vger.kernel.org> # v3.18+ Signed-off-by: John Youn <johny...@synopsys.com> --- driv

Re: [PATCH 1/6] usb: dwc3: Support Synopsys USB 3.1 IP

2015-10-01 Thread John Youn
On 10/1/2015 7:03 PM, Felipe Balbi wrote: > Hi, > > On Fri, Sep 04, 2015 at 07:15:10PM -0700, John Youn wrote: >> This patch allows the dwc3 driver to run on the new Synopsys USB 3.1 >> IP core, albeit in USB 3.0 mode only. >> >> The Synopsys USB 3.1 IP (D

[PATCH 5/6] usb: dwc3: Add dis_enblslpm_quirk

2015-10-01 Thread John Youn
during suspend. Cc: <sta...@vger.kernel.org> # v3.18+ Signed-off-by: John Youn <johny...@synopsys.com> --- Documentation/devicetree/bindings/usb/dwc3.txt | 2 ++ drivers/usb/dwc3/core.c| 6 ++ drivers/usb/dwc3/core.h| 4 drivers/u

[PATCH 0/6] usb: dwc3: Various updates for Synopsys platforms

2015-10-01 Thread John Youn
Hi, This series contains several updates to dwc3 to support Synopsys platforms. Patch 1: Initial support for 3.1 IP (applies to all platforms) Patch 2-4: PCI id and platform data for Synopsys platforms Patch 5: Add a quirk to program a global register Patch 6: Formatting Thanks, John John Youn

[PATCH 3/6] usb: dwc3: pci: Add the PCI Product ID for Synopsys USB 3.1

2015-10-01 Thread John Youn
This adds the PCI product ID for the Synopsys USB 3.1 IP core (DWC_usb31) on a HAPS-based PCI development platform. Cc: <sta...@vger.kernel.org> # v3.18+ Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/dwc3-pci.c | 5 + 1 file changed, 5 insertions(+)

[PATCH 6/6] usb: dwc3: pci: trivial: Formatting

2015-10-01 Thread John Youn
Fix the alignment of the PCI device definitions. Also change the hex digit capitalization of one constant to make it consistent with the rest of the file and driver. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc3/dwc3-pci.c | 16 1 file chan

Re: [PATCH v3 0/4] Exynos4412-based Trats2 USB gadget (DWC2) fixes

2015-09-28 Thread John Youn
v3: > - rebased onto latest 'testing/next' from Felipe Balbi (includes > s3c_hsotg -> dwc2 rename) > > v2: > - moved setting of ll_hw_enabled flag to enable/disable functions, > as suggested by John Youn > - moved setting of phy width to dwc2_lowlevel_init function > &

Re: [PATCH v2 00/32] usb: dwc2: various bug fixes

2015-09-24 Thread John Youn
esting/next branch in Felipe's git. > > Thank you, > > Best regards, > Yousaf > > History: > v2: > - Rebase to latest testing/next > - Fix lock issue found by John Youn when calling >dwc2_hsotg_core_init_disconnected() from dwc2_conn_id_status_change() >

<    4   5   6   7   8   9   10   >