Skip to content

Commit

Permalink
usb: chipidea: host: init otg port number
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li Jun authored and Greg Kroah-Hartman committed Apr 24, 2014
1 parent 8a28b90 commit 0698b9b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions drivers/usb/chipidea/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0698b9b

Please sign in to comment.