|
@@ -230,14 +230,14 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- 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) &
|
|
|
- PHY_CLK_VALID, FSL_USB_PHY_CLK_TIMEOUT, 0) ||
|
|
|
- in_be32(non_ehci + FSL_SOC_USB_PRICTRL))) {
|
|
|
- dev_warn(hcd->self.controller, "USB PHY clock invalid\n");
|
|
|
+ /*
|
|
|
+ * check PHY_CLK_VALID to determine phy clock presence before writing
|
|
|
+ * to portsc
|
|
|
+ */
|
|
|
+ if (pdata->check_phy_clk_valid) {
|
|
|
+ if (!(in_be32(non_ehci + FSL_SOC_USB_CTRL) & PHY_CLK_VALID)) {
|
|
|
+ dev_warn(hcd->self.controller,
|
|
|
+ "USB PHY clock invalid\n");
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
}
|