* [RFC PATCH 0/3] ehci_msm fixes for APQ8064 USB host support.
@ 2014-06-18 17:00 Srinivas Kandagatla
[not found] ` <1403110801-3790-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
` (4 more replies)
0 siblings, 5 replies; 20+ messages in thread
From: Srinivas Kandagatla @ 2014-06-18 17:00 UTC (permalink / raw)
To: linux-usb
Cc: Felipe Balbi, Greg Kroah-Hartman, linux-arm-msm,
Srinivas Kandagatla
While testing usb host on Qualcomm APQ8064, I encountered few issues.
These patches fixes those issues.
Without these patches USB is not functional on AQ8064.
All the patches are tested on IFC6410.
Thanks,
srini
Srinivas Kandagatla (3):
usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs
usb: phy: msm: Make phy_reset clk and reset line optional.
usb: phy: msm: Do not do runtime pm if the phy is not idle
drivers/usb/host/Kconfig | 2 +-
drivers/usb/phy/phy-msm-usb.c | 14 ++++++++------
2 files changed, 9 insertions(+), 7 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 20+ messages in thread[parent not found: <1403110801-3790-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* [RFC PATCH 1/3] usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs [not found] ` <1403110801-3790-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2014-06-18 17:00 ` Srinivas Kandagatla 2014-06-18 17:01 ` [RFC PATCH 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle Srinivas Kandagatla 2014-06-30 17:28 ` [PATCH v1 0/3] ehci_msm fixes for APQ8064 USB host support Srinivas Kandagatla 2 siblings, 0 replies; 20+ messages in thread From: Srinivas Kandagatla @ 2014-06-18 17:00 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA Cc: Felipe Balbi, Greg Kroah-Hartman, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Srinivas Kandagatla This patch makes the msm ehci driver available to use on QCOM SOCs, which have the same IP. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> --- drivers/usb/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 61b7817..03314f8 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -176,7 +176,7 @@ config USB_EHCI_HCD_AT91 config USB_EHCI_MSM tristate "Support for Qualcomm QSD/MSM on-chip EHCI USB controller" - depends on ARCH_MSM + depends on ARCH_MSM || ARCH_QCOM select USB_EHCI_ROOT_HUB_TT ---help--- Enables support for the USB Host controller present on the -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 20+ messages in thread
* [RFC PATCH 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle [not found] ` <1403110801-3790-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2014-06-18 17:00 ` [RFC PATCH 1/3] usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs Srinivas Kandagatla @ 2014-06-18 17:01 ` Srinivas Kandagatla [not found] ` <1403110868-3924-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2014-06-30 17:28 ` [PATCH v1 0/3] ehci_msm fixes for APQ8064 USB host support Srinivas Kandagatla 2 siblings, 1 reply; 20+ messages in thread From: Srinivas Kandagatla @ 2014-06-18 17:01 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA Cc: Felipe Balbi, Greg Kroah-Hartman, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Srinivas Kandagatla Use case is when the phy is configured in host mode and a usb device is attached to board before bootup. On bootup, with the existing code and runtime pm enabled, the driver would decrement the pm usage count without checking the current state of the phy. This pm usage count decrement would trigger the runtime pm which than would abort the usb enumeration which was in progress. In my case a usb stick gets detected and then immediatly the driver goes to low power mode which is not correct. log: [ 1.631412] msm_hsusb_host 12520000.usb: EHCI Host Controller [ 1.636556] msm_hsusb_host 12520000.usb: new USB bus registered, assigned bus number 1 [ 1.642563] msm_hsusb_host 12520000.usb: irq 220, io mem 0x12520000 [ 1.658197] msm_hsusb_host 12520000.usb: USB 2.0 started, EHCI 1.00 [ 1.659473] hub 1-0:1.0: USB hub found [ 1.663415] hub 1-0:1.0: 1 port detected ... [ 1.973352] usb 1-1: new high-speed USB device number 2 using msm_hsusb_host [ 2.107707] usb-storage 1-1:1.0: USB Mass Storage device detected [ 2.108993] scsi0 : usb-storage 1-1:1.0 [ 2.678341] msm_otg 12520000.phy: USB in low power mode [ 3.168977] usb 1-1: USB disconnect, device number 2 This issue was detected on IFC6410 board. This patch fixes the intial runtime pm trigger by checking the phy state and decrementing the pm use count only when the phy state is IDLE. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> --- drivers/usb/phy/phy-msm-usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 3bb559d..78cc870 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c @@ -1229,7 +1229,9 @@ static void msm_otg_sm_work(struct work_struct *w) motg->chg_state = USB_CHG_STATE_UNDEFINED; motg->chg_type = USB_INVALID_CHARGER; } - pm_runtime_put_sync(otg->phy->dev); + + if (otg->phy->state == OTG_STATE_B_IDLE) + pm_runtime_put_sync(otg->phy->dev); break; case OTG_STATE_B_PERIPHERAL: dev_dbg(otg->phy->dev, "OTG_STATE_B_PERIPHERAL state\n"); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 20+ messages in thread
[parent not found: <1403110868-3924-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* Re: [RFC PATCH 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle [not found] ` <1403110868-3924-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2014-06-27 15:54 ` Felipe Balbi 2014-06-30 10:23 ` Srinivas Kandagatla 0 siblings, 1 reply; 20+ messages in thread From: Felipe Balbi @ 2014-06-27 15:54 UTC (permalink / raw) To: Srinivas Kandagatla Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Greg Kroah-Hartman, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 2316 bytes --] Hi, On Wed, Jun 18, 2014 at 06:01:08PM +0100, Srinivas Kandagatla wrote: > Use case is when the phy is configured in host mode and a usb device is > attached to board before bootup. On bootup, with the existing code and > runtime pm enabled, the driver would decrement the pm usage count > without checking the current state of the phy. This pm usage count > decrement would trigger the runtime pm which than would abort the > usb enumeration which was in progress. In my case a usb stick gets > detected and then immediatly the driver goes to low power mode which is > not correct. > > log: > [ 1.631412] msm_hsusb_host 12520000.usb: EHCI Host Controller > [ 1.636556] msm_hsusb_host 12520000.usb: new USB bus registered, assigned bus number 1 > [ 1.642563] msm_hsusb_host 12520000.usb: irq 220, io mem 0x12520000 > [ 1.658197] msm_hsusb_host 12520000.usb: USB 2.0 started, EHCI 1.00 > [ 1.659473] hub 1-0:1.0: USB hub found > [ 1.663415] hub 1-0:1.0: 1 port detected > ... > [ 1.973352] usb 1-1: new high-speed USB device number 2 using msm_hsusb_host > [ 2.107707] usb-storage 1-1:1.0: USB Mass Storage device detected > [ 2.108993] scsi0 : usb-storage 1-1:1.0 > [ 2.678341] msm_otg 12520000.phy: USB in low power mode > [ 3.168977] usb 1-1: USB disconnect, device number 2 > > This issue was detected on IFC6410 board. > > This patch fixes the intial runtime pm trigger by checking the phy > state and decrementing the pm use count only when the phy state is IDLE. > > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > --- > drivers/usb/phy/phy-msm-usb.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c > index 3bb559d..78cc870 100644 > --- a/drivers/usb/phy/phy-msm-usb.c > +++ b/drivers/usb/phy/phy-msm-usb.c > @@ -1229,7 +1229,9 @@ static void msm_otg_sm_work(struct work_struct *w) > motg->chg_state = USB_CHG_STATE_UNDEFINED; > motg->chg_type = USB_INVALID_CHARGER; > } > - pm_runtime_put_sync(otg->phy->dev); > + > + if (otg->phy->state == OTG_STATE_B_IDLE) > + pm_runtime_put_sync(otg->phy->dev); instead, you might as well just use autosuspend. -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [RFC PATCH 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle 2014-06-27 15:54 ` Felipe Balbi @ 2014-06-30 10:23 ` Srinivas Kandagatla [not found] ` <53B13AAF.7060909-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 20+ messages in thread From: Srinivas Kandagatla @ 2014-06-30 10:23 UTC (permalink / raw) To: balbi; +Cc: linux-usb, Greg Kroah-Hartman, linux-arm-msm Hi Felipe, On 27/06/14 16:54, Felipe Balbi wrote: > Hi, > > On Wed, Jun 18, 2014 at 06:01:08PM +0100, Srinivas Kandagatla wrote: >> Use case is when the phy is configured in host mode and a usb device is >> attached to board before bootup. On bootup, with the existing code and >> runtime pm enabled, the driver would decrement the pm usage count >> without checking the current state of the phy. This pm usage count >> decrement would trigger the runtime pm which than would abort the >> usb enumeration which was in progress. In my case a usb stick gets >> detected and then immediatly the driver goes to low power mode which is >> not correct. >> >> log: >> [ 1.631412] msm_hsusb_host 12520000.usb: EHCI Host Controller >> [ 1.636556] msm_hsusb_host 12520000.usb: new USB bus registered, assigned bus number 1 >> [ 1.642563] msm_hsusb_host 12520000.usb: irq 220, io mem 0x12520000 >> [ 1.658197] msm_hsusb_host 12520000.usb: USB 2.0 started, EHCI 1.00 >> [ 1.659473] hub 1-0:1.0: USB hub found >> [ 1.663415] hub 1-0:1.0: 1 port detected >> ... >> [ 1.973352] usb 1-1: new high-speed USB device number 2 using msm_hsusb_host >> [ 2.107707] usb-storage 1-1:1.0: USB Mass Storage device detected >> [ 2.108993] scsi0 : usb-storage 1-1:1.0 >> [ 2.678341] msm_otg 12520000.phy: USB in low power mode >> [ 3.168977] usb 1-1: USB disconnect, device number 2 >> >> This issue was detected on IFC6410 board. >> >> This patch fixes the intial runtime pm trigger by checking the phy >> state and decrementing the pm use count only when the phy state is IDLE. >> >> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> >> --- >> drivers/usb/phy/phy-msm-usb.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c >> index 3bb559d..78cc870 100644 >> --- a/drivers/usb/phy/phy-msm-usb.c >> +++ b/drivers/usb/phy/phy-msm-usb.c >> @@ -1229,7 +1229,9 @@ static void msm_otg_sm_work(struct work_struct *w) >> motg->chg_state = USB_CHG_STATE_UNDEFINED; >> motg->chg_type = USB_INVALID_CHARGER; >> } >> - pm_runtime_put_sync(otg->phy->dev); >> + >> + if (otg->phy->state == OTG_STATE_B_IDLE) >> + pm_runtime_put_sync(otg->phy->dev); > > instead, you might as well just use autosuspend. autosuspend is a good idea and will provide a delay before rumtime suspend, however the bug which is fixed here still needs to be fixed anyway. runtime PM in this driver is not that great, the driver just increments the pm use count if the phy is configured in host or deivce mode. This patch fixes a bug in its state-machine which decrements pm use-count without checking the state. As this is a PHY driver, am not sure moving to autosuspend means we would end up just adding some static inactivity delay? Is it really going to add any value to this PHY driver? --srini > ^ permalink raw reply [flat|nested] 20+ messages in thread
[parent not found: <53B13AAF.7060909-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* Re: [RFC PATCH 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle [not found] ` <53B13AAF.7060909-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2014-06-30 17:13 ` Felipe Balbi 0 siblings, 0 replies; 20+ messages in thread From: Felipe Balbi @ 2014-06-30 17:13 UTC (permalink / raw) To: Srinivas Kandagatla Cc: balbi-l0cyMroinI0, linux-usb-u79uwXL29TY76Z2rM5mHXA, Greg Kroah-Hartman, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 3232 bytes --] On Mon, Jun 30, 2014 at 11:23:43AM +0100, Srinivas Kandagatla wrote: > Hi Felipe, > > On 27/06/14 16:54, Felipe Balbi wrote: > >Hi, > > > >On Wed, Jun 18, 2014 at 06:01:08PM +0100, Srinivas Kandagatla wrote: > >>Use case is when the phy is configured in host mode and a usb device is > >>attached to board before bootup. On bootup, with the existing code and > >>runtime pm enabled, the driver would decrement the pm usage count > >>without checking the current state of the phy. This pm usage count > >>decrement would trigger the runtime pm which than would abort the > >>usb enumeration which was in progress. In my case a usb stick gets > >>detected and then immediatly the driver goes to low power mode which is > >>not correct. > >> > >>log: > >>[ 1.631412] msm_hsusb_host 12520000.usb: EHCI Host Controller > >>[ 1.636556] msm_hsusb_host 12520000.usb: new USB bus registered, assigned bus number 1 > >>[ 1.642563] msm_hsusb_host 12520000.usb: irq 220, io mem 0x12520000 > >>[ 1.658197] msm_hsusb_host 12520000.usb: USB 2.0 started, EHCI 1.00 > >>[ 1.659473] hub 1-0:1.0: USB hub found > >>[ 1.663415] hub 1-0:1.0: 1 port detected > >>... > >>[ 1.973352] usb 1-1: new high-speed USB device number 2 using msm_hsusb_host > >>[ 2.107707] usb-storage 1-1:1.0: USB Mass Storage device detected > >>[ 2.108993] scsi0 : usb-storage 1-1:1.0 > >>[ 2.678341] msm_otg 12520000.phy: USB in low power mode > >>[ 3.168977] usb 1-1: USB disconnect, device number 2 > >> > >>This issue was detected on IFC6410 board. > >> > >>This patch fixes the intial runtime pm trigger by checking the phy > >>state and decrementing the pm use count only when the phy state is IDLE. > >> > >>Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > >>--- > >> drivers/usb/phy/phy-msm-usb.c | 4 +++- > >> 1 file changed, 3 insertions(+), 1 deletion(-) > >> > >>diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c > >>index 3bb559d..78cc870 100644 > >>--- a/drivers/usb/phy/phy-msm-usb.c > >>+++ b/drivers/usb/phy/phy-msm-usb.c > >>@@ -1229,7 +1229,9 @@ static void msm_otg_sm_work(struct work_struct *w) > >> motg->chg_state = USB_CHG_STATE_UNDEFINED; > >> motg->chg_type = USB_INVALID_CHARGER; > >> } > >>- pm_runtime_put_sync(otg->phy->dev); > >>+ > >>+ if (otg->phy->state == OTG_STATE_B_IDLE) > >>+ pm_runtime_put_sync(otg->phy->dev); > > > >instead, you might as well just use autosuspend. > > autosuspend is a good idea and will provide a delay before rumtime suspend, > however the bug which is fixed here still needs to be fixed anyway. > > runtime PM in this driver is not that great, the driver just increments the > pm use count if the phy is configured in host or deivce mode. This patch > fixes a bug in its state-machine which decrements pm use-count without > checking the state. > > As this is a PHY driver, am not sure moving to autosuspend means we would > end up just adding some static inactivity delay? Is it really going to add > any value to this PHY driver? yeah, perhaps not... I guess we can apply this as a fix; you're right. -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v1 0/3] ehci_msm fixes for APQ8064 USB host support. [not found] ` <1403110801-3790-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2014-06-18 17:00 ` [RFC PATCH 1/3] usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs Srinivas Kandagatla 2014-06-18 17:01 ` [RFC PATCH 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle Srinivas Kandagatla @ 2014-06-30 17:28 ` Srinivas Kandagatla 2014-06-30 17:29 ` [PATCH v1 1/3] usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs Srinivas Kandagatla ` (2 more replies) 2 siblings, 3 replies; 20+ messages in thread From: Srinivas Kandagatla @ 2014-06-30 17:28 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Srinivas Kandagatla While testing usb host on Qualcomm APQ8064, I encountered few issues. These patches fixes those issues. Without these patches USB is not functional on AQ8064. All the patches are tested on IFC6410. Resending the patches by removing the RFC in the subject. Can you please consider these patches for next rc, as they are just fixes. Thanks, srini Srinivas Kandagatla (3): usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs usb: phy: msm: Make phy_reset clk and reset line optional. usb: phy: msm: Do not do runtime pm if the phy is not idle drivers/usb/host/Kconfig | 2 +- drivers/usb/phy/phy-msm-usb.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v1 1/3] usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs 2014-06-30 17:28 ` [PATCH v1 0/3] ehci_msm fixes for APQ8064 USB host support Srinivas Kandagatla @ 2014-06-30 17:29 ` Srinivas Kandagatla [not found] ` <1404149374-11887-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2014-06-30 17:29 ` [PATCH v1 2/3] usb: phy: msm: Make phy_reset clk and reset line optional Srinivas Kandagatla 2014-06-30 17:29 ` [PATCH v1 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle Srinivas Kandagatla 2 siblings, 1 reply; 20+ messages in thread From: Srinivas Kandagatla @ 2014-06-30 17:29 UTC (permalink / raw) To: linux-usb, Felipe Balbi; +Cc: gregkh, linux-arm-msm, Srinivas Kandagatla This patch makes the msm ehci driver available to use on QCOM SOCs, which have the same IP. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --- drivers/usb/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 61b7817..03314f8 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -176,7 +176,7 @@ config USB_EHCI_HCD_AT91 config USB_EHCI_MSM tristate "Support for Qualcomm QSD/MSM on-chip EHCI USB controller" - depends on ARCH_MSM + depends on ARCH_MSM || ARCH_QCOM select USB_EHCI_ROOT_HUB_TT ---help--- Enables support for the USB Host controller present on the -- 1.9.1 ^ permalink raw reply related [flat|nested] 20+ messages in thread
[parent not found: <1404149374-11887-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* Re: [PATCH v1 1/3] usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs [not found] ` <1404149374-11887-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2014-06-30 17:55 ` Felipe Balbi [not found] ` <20140630175500.GM31442-HgARHv6XitL9zxVx7UNMDg@public.gmane.org> 0 siblings, 1 reply; 20+ messages in thread From: Felipe Balbi @ 2014-06-30 17:55 UTC (permalink / raw) To: Srinivas Kandagatla Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 992 bytes --] On Mon, Jun 30, 2014 at 06:29:34PM +0100, Srinivas Kandagatla wrote: > This patch makes the msm ehci driver available to use on QCOM SOCs, > which have the same IP. > > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Alan, this is ok to me: Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > --- > drivers/usb/host/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig > index 61b7817..03314f8 100644 > --- a/drivers/usb/host/Kconfig > +++ b/drivers/usb/host/Kconfig > @@ -176,7 +176,7 @@ config USB_EHCI_HCD_AT91 > > config USB_EHCI_MSM > tristate "Support for Qualcomm QSD/MSM on-chip EHCI USB controller" > - depends on ARCH_MSM > + depends on ARCH_MSM || ARCH_QCOM > select USB_EHCI_ROOT_HUB_TT > ---help--- > Enables support for the USB Host controller present on the > -- > 1.9.1 > -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 20+ messages in thread
[parent not found: <20140630175500.GM31442-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>]
* Re: [PATCH v1 1/3] usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs [not found] ` <20140630175500.GM31442-HgARHv6XitL9zxVx7UNMDg@public.gmane.org> @ 2014-06-30 18:28 ` Alan Stern 0 siblings, 0 replies; 20+ messages in thread From: Alan Stern @ 2014-06-30 18:28 UTC (permalink / raw) To: Greg KH, Felipe Balbi Cc: Srinivas Kandagatla, USB list, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA On Mon, 30 Jun 2014, Felipe Balbi wrote: > On Mon, Jun 30, 2014 at 06:29:34PM +0100, Srinivas Kandagatla wrote: > > This patch makes the msm ehci driver available to use on QCOM SOCs, > > which have the same IP. > > > > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > > Alan, this is ok to me: > > Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> Greg, it's okay with me too. Acked-by: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org> > > --- > > drivers/usb/host/Kconfig | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig > > index 61b7817..03314f8 100644 > > --- a/drivers/usb/host/Kconfig > > +++ b/drivers/usb/host/Kconfig > > @@ -176,7 +176,7 @@ config USB_EHCI_HCD_AT91 > > > > config USB_EHCI_MSM > > tristate "Support for Qualcomm QSD/MSM on-chip EHCI USB controller" > > - depends on ARCH_MSM > > + depends on ARCH_MSM || ARCH_QCOM > > select USB_EHCI_ROOT_HUB_TT > > ---help--- > > Enables support for the USB Host controller present on the > > -- > > 1.9.1 > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v1 2/3] usb: phy: msm: Make phy_reset clk and reset line optional. 2014-06-30 17:28 ` [PATCH v1 0/3] ehci_msm fixes for APQ8064 USB host support Srinivas Kandagatla 2014-06-30 17:29 ` [PATCH v1 1/3] usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs Srinivas Kandagatla @ 2014-06-30 17:29 ` Srinivas Kandagatla 2014-06-30 17:29 ` [PATCH v1 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle Srinivas Kandagatla 2 siblings, 0 replies; 20+ messages in thread From: Srinivas Kandagatla @ 2014-06-30 17:29 UTC (permalink / raw) To: linux-usb, Felipe Balbi; +Cc: gregkh, linux-arm-msm, Srinivas Kandagatla This patch makes the phy reset clk and reset line optional as this clk is not available on boards like IFC6410 with APQ8064. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --- drivers/usb/phy/phy-msm-usb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index ced34f3..3bb559d 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c @@ -279,11 +279,11 @@ static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert) static int msm_otg_phy_clk_reset(struct msm_otg *motg) { - int ret; + int ret = 0; - if (motg->pdata->phy_clk_reset) + if (motg->pdata->phy_clk_reset && motg->phy_reset_clk) ret = motg->pdata->phy_clk_reset(motg->phy_reset_clk); - else + else if (motg->phy_rst) ret = reset_control_reset(motg->phy_rst); if (ret) @@ -1464,7 +1464,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) motg->phy_rst = devm_reset_control_get(&pdev->dev, "phy"); if (IS_ERR(motg->phy_rst)) - return PTR_ERR(motg->phy_rst); + motg->phy_rst = NULL; pdata->mode = of_usb_get_dr_mode(node); if (pdata->mode == USB_DR_MODE_UNKNOWN) @@ -1556,7 +1556,7 @@ static int msm_otg_probe(struct platform_device *pdev) np ? "phy" : "usb_phy_clk"); if (IS_ERR(motg->phy_reset_clk)) { dev_err(&pdev->dev, "failed to get usb_phy_clk\n"); - return PTR_ERR(motg->phy_reset_clk); + motg->phy_reset_clk = NULL; } motg->clk = devm_clk_get(&pdev->dev, np ? "core" : "usb_hs_clk"); -- 1.9.1 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v1 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle 2014-06-30 17:28 ` [PATCH v1 0/3] ehci_msm fixes for APQ8064 USB host support Srinivas Kandagatla 2014-06-30 17:29 ` [PATCH v1 1/3] usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs Srinivas Kandagatla 2014-06-30 17:29 ` [PATCH v1 2/3] usb: phy: msm: Make phy_reset clk and reset line optional Srinivas Kandagatla @ 2014-06-30 17:29 ` Srinivas Kandagatla 2014-06-30 17:56 ` Felipe Balbi [not found] ` <CA+neC=MbFm4X4ccJdFgV20Lne-61nA6M56_S+-wEi5XR+2f29Q@mail.gmail.com> 2 siblings, 2 replies; 20+ messages in thread From: Srinivas Kandagatla @ 2014-06-30 17:29 UTC (permalink / raw) To: linux-usb, Felipe Balbi; +Cc: gregkh, linux-arm-msm, Srinivas Kandagatla Use case is when the phy is configured in host mode and a usb device is attached to board before bootup. On bootup, with the existing code and runtime pm enabled, the driver would decrement the pm usage count without checking the current state of the phy. This pm usage count decrement would trigger the runtime pm which than would abort the usb enumeration which was in progress. In my case a usb stick gets detected and then immediatly the driver goes to low power mode which is not correct. log: [ 1.631412] msm_hsusb_host 12520000.usb: EHCI Host Controller [ 1.636556] msm_hsusb_host 12520000.usb: new USB bus registered, assigned bus number 1 [ 1.642563] msm_hsusb_host 12520000.usb: irq 220, io mem 0x12520000 [ 1.658197] msm_hsusb_host 12520000.usb: USB 2.0 started, EHCI 1.00 [ 1.659473] hub 1-0:1.0: USB hub found [ 1.663415] hub 1-0:1.0: 1 port detected ... [ 1.973352] usb 1-1: new high-speed USB device number 2 using msm_hsusb_host [ 2.107707] usb-storage 1-1:1.0: USB Mass Storage device detected [ 2.108993] scsi0 : usb-storage 1-1:1.0 [ 2.678341] msm_otg 12520000.phy: USB in low power mode [ 3.168977] usb 1-1: USB disconnect, device number 2 This issue was detected on IFC6410 board. This patch fixes the intial runtime pm trigger by checking the phy state and decrementing the pm use count only when the phy state is IDLE. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --- drivers/usb/phy/phy-msm-usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 3bb559d..78cc870 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c @@ -1229,7 +1229,9 @@ static void msm_otg_sm_work(struct work_struct *w) motg->chg_state = USB_CHG_STATE_UNDEFINED; motg->chg_type = USB_INVALID_CHARGER; } - pm_runtime_put_sync(otg->phy->dev); + + if (otg->phy->state == OTG_STATE_B_IDLE) + pm_runtime_put_sync(otg->phy->dev); break; case OTG_STATE_B_PERIPHERAL: dev_dbg(otg->phy->dev, "OTG_STATE_B_PERIPHERAL state\n"); -- 1.9.1 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v1 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle 2014-06-30 17:29 ` [PATCH v1 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle Srinivas Kandagatla @ 2014-06-30 17:56 ` Felipe Balbi 2014-06-30 18:06 ` Srinivas Kandagatla [not found] ` <CA+neC=MbFm4X4ccJdFgV20Lne-61nA6M56_S+-wEi5XR+2f29Q@mail.gmail.com> 1 sibling, 1 reply; 20+ messages in thread From: Felipe Balbi @ 2014-06-30 17:56 UTC (permalink / raw) To: Srinivas Kandagatla; +Cc: linux-usb, Felipe Balbi, gregkh, linux-arm-msm [-- Attachment #1: Type: text/plain, Size: 2464 bytes --] On Mon, Jun 30, 2014 at 06:29:57PM +0100, Srinivas Kandagatla wrote: > Use case is when the phy is configured in host mode and a usb device is > attached to board before bootup. On bootup, with the existing code and > runtime pm enabled, the driver would decrement the pm usage count > without checking the current state of the phy. This pm usage count > decrement would trigger the runtime pm which than would abort the > usb enumeration which was in progress. In my case a usb stick gets > detected and then immediatly the driver goes to low power mode which is > not correct. > > log: > [ 1.631412] msm_hsusb_host 12520000.usb: EHCI Host Controller > [ 1.636556] msm_hsusb_host 12520000.usb: new USB bus registered, assigned bus number 1 > [ 1.642563] msm_hsusb_host 12520000.usb: irq 220, io mem 0x12520000 > [ 1.658197] msm_hsusb_host 12520000.usb: USB 2.0 started, EHCI 1.00 > [ 1.659473] hub 1-0:1.0: USB hub found > [ 1.663415] hub 1-0:1.0: 1 port detected > ... > [ 1.973352] usb 1-1: new high-speed USB device number 2 using msm_hsusb_host > [ 2.107707] usb-storage 1-1:1.0: USB Mass Storage device detected > [ 2.108993] scsi0 : usb-storage 1-1:1.0 > [ 2.678341] msm_otg 12520000.phy: USB in low power mode > [ 3.168977] usb 1-1: USB disconnect, device number 2 > > This issue was detected on IFC6410 board. > > This patch fixes the intial runtime pm trigger by checking the phy > state and decrementing the pm use count only when the phy state is IDLE. > > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> > --- > drivers/usb/phy/phy-msm-usb.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c > index 3bb559d..78cc870 100644 > --- a/drivers/usb/phy/phy-msm-usb.c > +++ b/drivers/usb/phy/phy-msm-usb.c > @@ -1229,7 +1229,9 @@ static void msm_otg_sm_work(struct work_struct *w) > motg->chg_state = USB_CHG_STATE_UNDEFINED; > motg->chg_type = USB_INVALID_CHARGER; > } > - pm_runtime_put_sync(otg->phy->dev); > + > + if (otg->phy->state == OTG_STATE_B_IDLE) > + pm_runtime_put_sync(otg->phy->dev); > break; > case OTG_STATE_B_PERIPHERAL: > dev_dbg(otg->phy->dev, "OTG_STATE_B_PERIPHERAL state\n"); does this need to go on this -rc or can it wait until v3.17 merge window? Also, how far back should this be backported ? -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle 2014-06-30 17:56 ` Felipe Balbi @ 2014-06-30 18:06 ` Srinivas Kandagatla 0 siblings, 0 replies; 20+ messages in thread From: Srinivas Kandagatla @ 2014-06-30 18:06 UTC (permalink / raw) To: balbi; +Cc: linux-usb, gregkh, linux-arm-msm On 30/06/14 18:56, Felipe Balbi wrote: > On Mon, Jun 30, 2014 at 06:29:57PM +0100, Srinivas Kandagatla wrote: >> Use case is when the phy is configured in host mode and a usb device is >> attached to board before bootup. On bootup, with the existing code and >> runtime pm enabled, the driver would decrement the pm usage count >> without checking the current state of the phy. This pm usage count >> decrement would trigger the runtime pm which than would abort the >> usb enumeration which was in progress. In my case a usb stick gets >> detected and then immediatly the driver goes to low power mode which is >> not correct. >> >> log: >> [ 1.631412] msm_hsusb_host 12520000.usb: EHCI Host Controller >> [ 1.636556] msm_hsusb_host 12520000.usb: new USB bus registered, assigned bus number 1 >> [ 1.642563] msm_hsusb_host 12520000.usb: irq 220, io mem 0x12520000 >> [ 1.658197] msm_hsusb_host 12520000.usb: USB 2.0 started, EHCI 1.00 >> [ 1.659473] hub 1-0:1.0: USB hub found >> [ 1.663415] hub 1-0:1.0: 1 port detected >> ... >> [ 1.973352] usb 1-1: new high-speed USB device number 2 using msm_hsusb_host >> [ 2.107707] usb-storage 1-1:1.0: USB Mass Storage device detected >> [ 2.108993] scsi0 : usb-storage 1-1:1.0 >> [ 2.678341] msm_otg 12520000.phy: USB in low power mode >> [ 3.168977] usb 1-1: USB disconnect, device number 2 >> >> This issue was detected on IFC6410 board. >> >> This patch fixes the intial runtime pm trigger by checking the phy >> state and decrementing the pm use count only when the phy state is IDLE. >> >> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> >> --- >> drivers/usb/phy/phy-msm-usb.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c >> index 3bb559d..78cc870 100644 >> --- a/drivers/usb/phy/phy-msm-usb.c >> +++ b/drivers/usb/phy/phy-msm-usb.c >> @@ -1229,7 +1229,9 @@ static void msm_otg_sm_work(struct work_struct *w) >> motg->chg_state = USB_CHG_STATE_UNDEFINED; >> motg->chg_type = USB_INVALID_CHARGER; >> } >> - pm_runtime_put_sync(otg->phy->dev); >> + >> + if (otg->phy->state == OTG_STATE_B_IDLE) >> + pm_runtime_put_sync(otg->phy->dev); >> break; >> case OTG_STATE_B_PERIPHERAL: >> dev_dbg(otg->phy->dev, "OTG_STATE_B_PERIPHERAL state\n"); > > does this need to go on this -rc or can it wait until v3.17 merge Getting it to rc would be nice :-), but I will leave it up to you. > window? Also, how far back should this be backported ? This patch is required if runtime pm is activated. --srini > ^ permalink raw reply [flat|nested] 20+ messages in thread
[parent not found: <CA+neC=MbFm4X4ccJdFgV20Lne-61nA6M56_S+-wEi5XR+2f29Q@mail.gmail.com>]
[parent not found: <CA+neC=MbFm4X4ccJdFgV20Lne-61nA6M56_S+-wEi5XR+2f29Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* RE: Fwd: [PATCH v1 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle [not found] ` <CA+neC=MbFm4X4ccJdFgV20Lne-61nA6M56_S+-wEi5XR+2f29Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2014-07-17 8:00 ` prakash.burla-edOiRQu9Xnj5XLMNweQjbQ 0 siblings, 0 replies; 20+ messages in thread From: prakash.burla-edOiRQu9Xnj5XLMNweQjbQ @ 2014-07-17 8:00 UTC (permalink / raw) To: srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, regkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA tested-by: Prakash Burla <prakash.burla-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org> This driver tested on AP806X with USB MSM-PHY Driver. -------------------------------------------------------------------- From: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Date: Mon, Jun 30, 2014 at 10:59 PM Subject: [PATCH v1 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle To: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Use case is when the phy is configured in host mode and a usb device is attached to board before bootup. On bootup, with the existing code and runtime pm enabled, the driver would decrement the pm usage count without checking the current state of the phy. This pm usage count decrement would trigger the runtime pm which than would abort the usb enumeration which was in progress. In my case a usb stick gets detected and then immediatly the driver goes to low power mode which is not correct. log: [ 1.631412] msm_hsusb_host 12520000.usb: EHCI Host Controller [ 1.636556] msm_hsusb_host 12520000.usb: new USB bus registered, assigned bus number 1 [ 1.642563] msm_hsusb_host 12520000.usb: irq 220, io mem 0x12520000 [ 1.658197] msm_hsusb_host 12520000.usb: USB 2.0 started, EHCI 1.00 [ 1.659473] hub 1-0:1.0: USB hub found [ 1.663415] hub 1-0:1.0: 1 port detected ... [ 1.973352] usb 1-1: new high-speed USB device number 2 using msm_hsusb_host [ 2.107707] usb-storage 1-1:1.0: USB Mass Storage device detected [ 2.108993] scsi0 : usb-storage 1-1:1.0 [ 2.678341] msm_otg 12520000.phy: USB in low power mode [ 3.168977] usb 1-1: USB disconnect, device number 2 This issue was detected on IFC6410 board. This patch fixes the intial runtime pm trigger by checking the phy state and decrementing the pm use count only when the phy state is IDLE. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> --- drivers/usb/phy/phy-msm-usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 3bb559d..78cc870 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c @@ -1229,7 +1229,9 @@ static void msm_otg_sm_work(struct work_struct *w) motg->chg_state = USB_CHG_STATE_UNDEFINED; motg->chg_type = USB_INVALID_CHARGER; } - pm_runtime_put_sync(otg->phy->dev); + + if (otg->phy->state == OTG_STATE_B_IDLE) + pm_runtime_put_sync(otg->phy->dev); break; case OTG_STATE_B_PERIPHERAL: dev_dbg(otg->phy->dev, "OTG_STATE_B_PERIPHERAL state\n"); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 20+ messages in thread
* [RFC PATCH 2/3] usb: phy: msm: Make phy_reset clk and reset line optional. 2014-06-18 17:00 [RFC PATCH 0/3] ehci_msm fixes for APQ8064 USB host support Srinivas Kandagatla [not found] ` <1403110801-3790-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2014-06-18 17:01 ` Srinivas Kandagatla 2014-06-26 8:03 ` [RFC PATCH 0/3] ehci_msm fixes for APQ8064 USB host support Srinivas Kandagatla ` (2 subsequent siblings) 4 siblings, 0 replies; 20+ messages in thread From: Srinivas Kandagatla @ 2014-06-18 17:01 UTC (permalink / raw) To: linux-usb Cc: Felipe Balbi, Greg Kroah-Hartman, linux-arm-msm, Srinivas Kandagatla This patch makes the phy reset clk and reset line optional as this clk is not available on boards like IFC6410 with APQ8064. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --- drivers/usb/phy/phy-msm-usb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index ced34f3..3bb559d 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c @@ -279,11 +279,11 @@ static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert) static int msm_otg_phy_clk_reset(struct msm_otg *motg) { - int ret; + int ret = 0; - if (motg->pdata->phy_clk_reset) + if (motg->pdata->phy_clk_reset && motg->phy_reset_clk) ret = motg->pdata->phy_clk_reset(motg->phy_reset_clk); - else + else if (motg->phy_rst) ret = reset_control_reset(motg->phy_rst); if (ret) @@ -1464,7 +1464,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) motg->phy_rst = devm_reset_control_get(&pdev->dev, "phy"); if (IS_ERR(motg->phy_rst)) - return PTR_ERR(motg->phy_rst); + motg->phy_rst = NULL; pdata->mode = of_usb_get_dr_mode(node); if (pdata->mode == USB_DR_MODE_UNKNOWN) @@ -1556,7 +1556,7 @@ static int msm_otg_probe(struct platform_device *pdev) np ? "phy" : "usb_phy_clk"); if (IS_ERR(motg->phy_reset_clk)) { dev_err(&pdev->dev, "failed to get usb_phy_clk\n"); - return PTR_ERR(motg->phy_reset_clk); + motg->phy_reset_clk = NULL; } motg->clk = devm_clk_get(&pdev->dev, np ? "core" : "usb_hs_clk"); -- 1.9.1 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [RFC PATCH 0/3] ehci_msm fixes for APQ8064 USB host support. 2014-06-18 17:00 [RFC PATCH 0/3] ehci_msm fixes for APQ8064 USB host support Srinivas Kandagatla [not found] ` <1403110801-3790-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2014-06-18 17:01 ` [RFC PATCH 2/3] usb: phy: msm: Make phy_reset clk and reset line optional Srinivas Kandagatla @ 2014-06-26 8:03 ` Srinivas Kandagatla 2014-06-30 17:13 ` Felipe Balbi [not found] ` <CA+neC=N2JAXLEXXvR3cX_Co+Ykno=ibPeAj8Jt03aKWy_yObDw@mail.gmail.com> 4 siblings, 0 replies; 20+ messages in thread From: Srinivas Kandagatla @ 2014-06-26 8:03 UTC (permalink / raw) To: linux-usb; +Cc: Felipe Balbi, Greg Kroah-Hartman, linux-arm-msm Is it possible to queue these patches for next rc? Thanks, srini On 18/06/14 18:00, Srinivas Kandagatla wrote: > While testing usb host on Qualcomm APQ8064, I encountered few issues. > These patches fixes those issues. > > Without these patches USB is not functional on AQ8064. > All the patches are tested on IFC6410. > > Thanks, > srini > > Srinivas Kandagatla (3): > usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs > usb: phy: msm: Make phy_reset clk and reset line optional. > usb: phy: msm: Do not do runtime pm if the phy is not idle > > drivers/usb/host/Kconfig | 2 +- > drivers/usb/phy/phy-msm-usb.c | 14 ++++++++------ > 2 files changed, 9 insertions(+), 7 deletions(-) > ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [RFC PATCH 0/3] ehci_msm fixes for APQ8064 USB host support. 2014-06-18 17:00 [RFC PATCH 0/3] ehci_msm fixes for APQ8064 USB host support Srinivas Kandagatla ` (2 preceding siblings ...) 2014-06-26 8:03 ` [RFC PATCH 0/3] ehci_msm fixes for APQ8064 USB host support Srinivas Kandagatla @ 2014-06-30 17:13 ` Felipe Balbi 2014-06-30 17:15 ` Srinivas Kandagatla [not found] ` <CA+neC=N2JAXLEXXvR3cX_Co+Ykno=ibPeAj8Jt03aKWy_yObDw@mail.gmail.com> 4 siblings, 1 reply; 20+ messages in thread From: Felipe Balbi @ 2014-06-30 17:13 UTC (permalink / raw) To: Srinivas Kandagatla Cc: linux-usb, Felipe Balbi, Greg Kroah-Hartman, linux-arm-msm [-- Attachment #1: Type: text/plain, Size: 350 bytes --] Hi, On Wed, Jun 18, 2014 at 06:00:01PM +0100, Srinivas Kandagatla wrote: > While testing usb host on Qualcomm APQ8064, I encountered few issues. > These patches fixes those issues. > > Without these patches USB is not functional on AQ8064. > All the patches are tested on IFC6410. please resend without RFC so I can apply. -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [RFC PATCH 0/3] ehci_msm fixes for APQ8064 USB host support. 2014-06-30 17:13 ` Felipe Balbi @ 2014-06-30 17:15 ` Srinivas Kandagatla 0 siblings, 0 replies; 20+ messages in thread From: Srinivas Kandagatla @ 2014-06-30 17:15 UTC (permalink / raw) To: balbi; +Cc: linux-usb, Greg Kroah-Hartman, linux-arm-msm Thanks Felipe, On 30/06/14 18:13, Felipe Balbi wrote: > Hi, > > On Wed, Jun 18, 2014 at 06:00:01PM +0100, Srinivas Kandagatla wrote: >> While testing usb host on Qualcomm APQ8064, I encountered few issues. >> These patches fixes those issues. >> >> Without these patches USB is not functional on AQ8064. >> All the patches are tested on IFC6410. > > please resend without RFC so I can apply. > I will resend the patches. --srini ^ permalink raw reply [flat|nested] 20+ messages in thread
[parent not found: <CA+neC=N2JAXLEXXvR3cX_Co+Ykno=ibPeAj8Jt03aKWy_yObDw@mail.gmail.com>]
* RE: [RFC PATCH 0/3] ehci_msm fixes for APQ8064 USB host support. [not found] ` <CA+neC=N2JAXLEXXvR3cX_Co+Ykno=ibPeAj8Jt03aKWy_yObDw@mail.gmail.com> @ 2014-07-17 8:11 ` prakash.burla 0 siblings, 0 replies; 20+ messages in thread From: prakash.burla @ 2014-07-17 8:11 UTC (permalink / raw) To: srinivas.kandagatla, balbi; +Cc: inux-usb, gregkh, linux-arm-msm tested-by: Prakash Burla <prakash.burla@smartplayin.com> tested USB functional on IFC6410. ------------------------------------------------------------ From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Date: Wed, Jun 18, 2014 at 10:30 PM Subject: [RFC PATCH 0/3] ehci_msm fixes for APQ8064 USB host support. To: linux-usb@vger.kernel.org Cc: Felipe Balbi <balbi@ti.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla <srinivas.kandagatla@linaro.org> While testing usb host on Qualcomm APQ8064, I encountered few issues. These patches fixes those issues. Without these patches USB is not functional on AQ8064. All the patches are tested on IFC6410. Thanks, srini Srinivas Kandagatla (3): usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs usb: phy: msm: Make phy_reset clk and reset line optional. usb: phy: msm: Do not do runtime pm if the phy is not idle drivers/usb/host/Kconfig | 2 +- drivers/usb/phy/phy-msm-usb.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2014-07-17 8:11 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-18 17:00 [RFC PATCH 0/3] ehci_msm fixes for APQ8064 USB host support Srinivas Kandagatla
[not found] ` <1403110801-3790-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-06-18 17:00 ` [RFC PATCH 1/3] usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs Srinivas Kandagatla
2014-06-18 17:01 ` [RFC PATCH 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle Srinivas Kandagatla
[not found] ` <1403110868-3924-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-06-27 15:54 ` Felipe Balbi
2014-06-30 10:23 ` Srinivas Kandagatla
[not found] ` <53B13AAF.7060909-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-06-30 17:13 ` Felipe Balbi
2014-06-30 17:28 ` [PATCH v1 0/3] ehci_msm fixes for APQ8064 USB host support Srinivas Kandagatla
2014-06-30 17:29 ` [PATCH v1 1/3] usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs Srinivas Kandagatla
[not found] ` <1404149374-11887-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-06-30 17:55 ` Felipe Balbi
[not found] ` <20140630175500.GM31442-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
2014-06-30 18:28 ` Alan Stern
2014-06-30 17:29 ` [PATCH v1 2/3] usb: phy: msm: Make phy_reset clk and reset line optional Srinivas Kandagatla
2014-06-30 17:29 ` [PATCH v1 3/3] usb: phy: msm: Do not do runtime pm if the phy is not idle Srinivas Kandagatla
2014-06-30 17:56 ` Felipe Balbi
2014-06-30 18:06 ` Srinivas Kandagatla
[not found] ` <CA+neC=MbFm4X4ccJdFgV20Lne-61nA6M56_S+-wEi5XR+2f29Q@mail.gmail.com>
[not found] ` <CA+neC=MbFm4X4ccJdFgV20Lne-61nA6M56_S+-wEi5XR+2f29Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-17 8:00 ` Fwd: " prakash.burla-edOiRQu9Xnj5XLMNweQjbQ
2014-06-18 17:01 ` [RFC PATCH 2/3] usb: phy: msm: Make phy_reset clk and reset line optional Srinivas Kandagatla
2014-06-26 8:03 ` [RFC PATCH 0/3] ehci_msm fixes for APQ8064 USB host support Srinivas Kandagatla
2014-06-30 17:13 ` Felipe Balbi
2014-06-30 17:15 ` Srinivas Kandagatla
[not found] ` <CA+neC=N2JAXLEXXvR3cX_Co+Ykno=ibPeAj8Jt03aKWy_yObDw@mail.gmail.com>
2014-07-17 8:11 ` prakash.burla
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).