Re: [PATCH v7 03/11] usb: chipidea: host: init otg port number.
On Wed, Apr 09, 2014 at 08:44:32AM +0800, Peter Chen wrote: On Sat, Apr 05, 2014 at 01:37:16PM +0800, Li Jun wrote: Init otg_port number of otg capable host to be 1 at host start. Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/host.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index ffb4168..c9c645b 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -82,10 +82,17 @@ static int host_start(struct ci_hdrc *ci) } ret = usb_add_hcd(hcd, 0, 0); - if (ret) + if (ret) { goto disable_reg; - else + } else { + struct usb_otg *otg = ci-transceiver-otg; + ci-hcd = hcd; + if (ci_otg_is_fsm_mode(ci)) + hcd-self.otg_port = 1; + if (otg) + otg-host = hcd-self; Why update this patch? The ci-transceiver-otg is only allocated at otg_fsm_mode, isn't it? This is the same reason as your previous question in my 1st patch, if the host start happens before fsm init, I need leave the otg-host to be set in fsm init. Li Jun + } if (ci-platdata-flags CI_HDRC_DISABLE_STREAMING) hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS); -- 1.7.9.5 -- Best Regards, Peter Chen -- 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: [PATCH v7 03/11] usb: chipidea: host: init otg port number.
On Sat, Apr 05, 2014 at 01:37:16PM +0800, Li Jun wrote: Init otg_port number of otg capable host to be 1 at host start. Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/host.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index ffb4168..c9c645b 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -82,10 +82,17 @@ static int host_start(struct ci_hdrc *ci) } ret = usb_add_hcd(hcd, 0, 0); - if (ret) + if (ret) { goto disable_reg; - else + } else { + struct usb_otg *otg = ci-transceiver-otg; + ci-hcd = hcd; + if (ci_otg_is_fsm_mode(ci)) + hcd-self.otg_port = 1; + if (otg) + otg-host = hcd-self; Why update this patch? The ci-transceiver-otg is only allocated at otg_fsm_mode, isn't it? + } if (ci-platdata-flags CI_HDRC_DISABLE_STREAMING) hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS); -- 1.7.9.5 -- Best Regards, Peter Chen -- 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
[PATCH v7 03/11] usb: chipidea: host: init otg port number.
Init otg_port number of otg capable host to be 1 at host start. Signed-off-by: Li Jun b47...@freescale.com --- drivers/usb/chipidea/host.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index ffb4168..c9c645b 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -82,10 +82,17 @@ static int host_start(struct ci_hdrc *ci) } ret = usb_add_hcd(hcd, 0, 0); - if (ret) + if (ret) { goto disable_reg; - else + } else { + struct usb_otg *otg = ci-transceiver-otg; + ci-hcd = hcd; + if (ci_otg_is_fsm_mode(ci)) + hcd-self.otg_port = 1; + if (otg) + otg-host = hcd-self; + } if (ci-platdata-flags CI_HDRC_DISABLE_STREAMING) hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS); -- 1.7.9.5 -- 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