Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e56ecaf3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "phy-msm-usb : Do clk_get for optional alt_core_clk after mandatory clk"

parents 1aa3ff45 a5a2e2ac
Loading
Loading
Loading
Loading
+13 −20
Original line number Original line Diff line number Diff line
@@ -4395,28 +4395,12 @@ static int __init msm_otg_probe(struct platform_device *pdev)
		goto put_core_clk;
		goto put_core_clk;
	}
	}


	/*
	 * Targets on which link uses asynchronous reset methodology,
	 * free running clock is not required during the reset.
	 */
	motg->clk = clk_get(&pdev->dev, "alt_core_clk");
	if (IS_ERR(motg->clk)) {
		ret = PTR_ERR(motg->clk);
		motg->clk = NULL;
		if (ret != -EPROBE_DEFER)
			dev_dbg(&pdev->dev, "alt_core_clk is not present\n");
		else
			goto put_pclk;
	} else {
		clk_set_rate(motg->clk, 60000000);
	}

	motg->xo_clk = clk_get(&pdev->dev, "xo");
	motg->xo_clk = clk_get(&pdev->dev, "xo");
	if (IS_ERR(motg->xo_clk)) {
	if (IS_ERR(motg->xo_clk)) {
		ret = PTR_ERR(motg->xo_clk);
		ret = PTR_ERR(motg->xo_clk);
		motg->xo_clk = NULL;
		motg->xo_clk = NULL;
		if (ret == -EPROBE_DEFER)
		if (ret == -EPROBE_DEFER)
			goto put_clk;
			goto put_pclk;
	}
	}


	/*
	/*
@@ -4440,6 +4424,18 @@ static int __init msm_otg_probe(struct platform_device *pdev)
		}
		}
	}
	}


	/*
	 * Targets on which link uses asynchronous reset methodology,
	 * free running clock is not required during the reset.
	 */
	motg->clk = clk_get(&pdev->dev, "alt_core_clk");
	if (IS_ERR(motg->clk)) {
		motg->clk = NULL;
		dev_dbg(&pdev->dev, "alt_core_clk is not present\n");
	} else {
		clk_set_rate(motg->clk, 60000000);
	}

	if (pdev->dev.of_node) {
	if (pdev->dev.of_node) {
		dev_dbg(&pdev->dev, "device tree enabled\n");
		dev_dbg(&pdev->dev, "device tree enabled\n");
		pdata = msm_otg_dt_to_pdata(pdev);
		pdata = msm_otg_dt_to_pdata(pdev);
@@ -4873,9 +4869,6 @@ put_sleep_clk:
put_xo_clk:
put_xo_clk:
	if (motg->xo_clk)
	if (motg->xo_clk)
		clk_put(motg->xo_clk);
		clk_put(motg->xo_clk);
put_clk:
	if (motg->clk)
		clk_put(motg->clk);
put_pclk:
put_pclk:
	if (motg->pclk)
	if (motg->pclk)
		clk_put(motg->pclk);
		clk_put(motg->pclk);