USB: fsl/ehci: fix failure of checking PHY_CLK_VALID during reinitialization

In case of usb phy reinitialization:
e.g. insmod usb-module(usb works well) -> rmmod usb-module -> insmod usb-module
It found the PHY_CLK_VALID bit didn't work if it's not with the power-on reset.
So we just check PHY_CLK_VALID bit during the stage with POR, this can be met
by the tricky of checking FSL_SOC_USB_PRICTRL register.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by Shengzhou Liu and committed by Greg Kroah-Hartman eee41b49 2606b28a

Changed files
+3 -2
drivers
usb
host
+3 -2
drivers/usb/host/ehci-fsl.c
··· 264 264 if (pdata->have_sysif_regs && pdata->controller_ver && 265 265 (phy_mode == FSL_USB2_PHY_ULPI)) { 266 266 /* check PHY_CLK_VALID to get phy clk valid */ 267 - if (!spin_event_timeout(in_be32(non_ehci + FSL_SOC_USB_CTRL) & 268 - PHY_CLK_VALID, FSL_USB_PHY_CLK_TIMEOUT, 0)) { 267 + if (!(spin_event_timeout(in_be32(non_ehci + FSL_SOC_USB_CTRL) & 268 + PHY_CLK_VALID, FSL_USB_PHY_CLK_TIMEOUT, 0) || 269 + in_be32(non_ehci + FSL_SOC_USB_PRICTRL))) { 269 270 printk(KERN_WARNING "fsl-ehci: USB PHY clock invalid\n"); 270 271 return -EINVAL; 271 272 }