drivers: usb: fsl: Modify phy clk valid bit checking

Phy_clk_valid bit is checked only when the boolean
property phy-clk-valid in present in usb node device tree.
This property is added to the usb node via device tree fixup.

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Nikhil Badola
2015-07-14 17:28:10 +05:30
committed by Greg Kroah-Hartman
parent 6009d95e04
commit f4fdfaa280
3 changed files with 18 additions and 8 deletions

View File

@@ -222,6 +222,15 @@ static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev)
else
pdata->has_fsl_erratum_a007792 = 0;
/*
* Determine whether phy_clk_valid needs to be checked
* by reading property in device tree
*/
if (of_get_property(np, "phy-clk-valid", NULL))
pdata->check_phy_clk_valid = 1;
else
pdata->check_phy_clk_valid = 0;
if (pdata->have_sysif_regs) {
if (pdata->controller_ver == FSL_USB_VER_NONE) {
dev_warn(&ofdev->dev, "Could not get controller version\n");