X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=drivers%2Fusb%2Fhost%2Fehci-fsl.c;h=4bdcd3439d4777976effabc3b739e1736809dfbf;hb=4b31a34e0e0f8835fec2cca1f0d52275ac22b1ed;hp=6f2c8d3899d2cfb00f14fe641341f68944943213;hpb=1b17366d695c8ab03f98d0155357e97a427e1dce;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 6f2c8d3..4bdcd34 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -136,15 +136,15 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, if (pdata->operating_mode == FSL_USB2_DR_OTG) { struct ehci_hcd *ehci = hcd_to_ehci(hcd); - hcd->phy = usb_get_phy(USB_PHY_TYPE_USB2); + hcd->usb_phy = usb_get_phy(USB_PHY_TYPE_USB2); dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, phy=0x%p\n", - hcd, ehci, hcd->phy); + hcd, ehci, hcd->usb_phy); - if (!IS_ERR_OR_NULL(hcd->phy)) { - retval = otg_set_host(hcd->phy->otg, + if (!IS_ERR_OR_NULL(hcd->usb_phy)) { + retval = otg_set_host(hcd->usb_phy->otg, &ehci_to_hcd(ehci)->self); if (retval) { - usb_put_phy(hcd->phy); + usb_put_phy(hcd->usb_phy); goto err2; } } else { @@ -181,9 +181,9 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd, { struct fsl_usb2_platform_data *pdata = dev_get_platdata(&pdev->dev); - if (!IS_ERR_OR_NULL(hcd->phy)) { - otg_set_host(hcd->phy->otg, NULL); - usb_put_phy(hcd->phy); + if (!IS_ERR_OR_NULL(hcd->usb_phy)) { + otg_set_host(hcd->usb_phy->otg, NULL); + usb_put_phy(hcd->usb_phy); } usb_remove_hcd(hcd); @@ -248,7 +248,8 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd, break; } - if (pdata->have_sysif_regs && pdata->controller_ver && + if (pdata->have_sysif_regs && + pdata->controller_ver > FSL_USB_VER_1_6 && (phy_mode == FSL_USB2_PHY_ULPI)) { /* check PHY_CLK_VALID to get phy clk valid */ if (!(spin_event_timeout(in_be32(non_ehci + FSL_SOC_USB_CTRL) &