usb: allow to supply the PHY in the drivers when using HCD
[cascardo/linux.git] / drivers / usb / chipidea / host.c
index ebde7b6..789809f 100644 (file)
@@ -59,7 +59,7 @@ static int host_start(struct ci_hdrc *ci)
        hcd->has_tt = 1;
 
        hcd->power_budget = ci->platdata->power_budget;
-       hcd->usb_phy = ci->transceiver;
+       hcd->usb_phy = ci->usb_phy;
        hcd->tpl_support = ci->platdata->tpl_support;
 
        ehci = hcd_to_ehci(hcd);
@@ -86,10 +86,11 @@ static int host_start(struct ci_hdrc *ci)
        if (ret) {
                goto disable_reg;
        } else {
-               struct usb_otg *otg = ci->transceiver->otg;
+               struct usb_otg *otg = &ci->otg;
 
                ci->hcd = hcd;
-               if (otg) {
+
+               if (ci_otg_is_fsm_mode(ci)) {
                        otg->host = &hcd->self;
                        hcd->self.otg_port = 1;
                }