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

Commit 82701729 authored by Taniya Das's avatar Taniya Das
Browse files

clk: qcom: gpucc: Defer probe until XO clock registration



GPU_CC has a dependency on RPMH XO clock driver to register the GPU clocks
to the clock framework, so wait until the clock is registered.

Change-Id: I4e740919e4d14f55e2785d01acc1ade9dc856567
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent b3d3bd23
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -902,11 +902,13 @@
	};

	gpucc: qcom,gpucc {
		compatible = "qcom,gpucc-lito", "syscon";
		compatible = "qcom,lito-gpucc", "syscon";
		reg = <0x3d90000 0x9000>;
		reg-names = "cc_base";
		vdd_cx-supply = <&VDD_CX_LEVEL>;
		vdd_mx-supply = <&VDD_MX_LEVEL>;
		clocks = <&rpmhcc RPMH_CXO_CLK>;
		clock-names = "xo";
		#clock-cells = <1>;
		#reset-cells = <1>;
	};
+9 −0
Original line number Diff line number Diff line
@@ -404,9 +404,18 @@ MODULE_DEVICE_TABLE(of, gpu_cc_lito_match_table);
static int gpu_cc_lito_probe(struct platform_device *pdev)
{
	struct regmap *regmap;
	struct clk *clk;
	unsigned int value, mask;
	int ret;

	clk = clk_get(&pdev->dev, "xo");
	if (IS_ERR(clk)) {
		if (PTR_ERR(clk) != -EPROBE_DEFER)
			dev_err(&pdev->dev, "Unable to get ahb clock handle\n");
		return PTR_ERR(clk);
	}
	clk_put(clk);

	regmap = qcom_cc_map(pdev, &gpu_cc_lito_desc);
	if (IS_ERR(regmap))
		return PTR_ERR(regmap);