summaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/host.c
diff options
context:
space:
mode:
authorLi Jun <B47624@freescale.com>2014-04-23 09:56:46 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-24 21:56:35 +0200
commit0698b9b384d39ae8e855bbffac180ad5773efa72 (patch)
tree8692304f7d632d5729f92c3d3035b44fa7a03de7 /drivers/usb/chipidea/host.c
parentusb: chipidea: host: vbus control change for OTG HNP (diff)
downloadlinux-0698b9b384d39ae8e855bbffac180ad5773efa72.tar.xz
linux-0698b9b384d39ae8e855bbffac180ad5773efa72.zip
usb: chipidea: host: init otg port number
Init otg_port number of otg capable host to be 1 at host start. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Li Jun <b47624@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/host.c')
-rw-r--r--drivers/usb/chipidea/host.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index ffb41688c49f..a93d950e9468 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 (otg) {
+ otg->host = &hcd->self;
+ hcd->self.otg_port = 1;
+ }
+ }
if (ci->platdata->flags & CI_HDRC_DISABLE_STREAMING)
hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);