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

Commit 13b7fc9f authored by Amit Nischal's avatar Amit Nischal
Browse files

clk: msm: gcc: Add dependency on GCC-XO clock in GPUCC driver



For ARM32 device, GCC driver is probing later than GPUCC driver and
as a result of this bootup error is occurring. Fix the same by
adding dependency on XO clock in GPUCC driver probe so that GPUCC
probe will defer until registration of GCC clocks.

Change-Id: I3c2d18719028d121efac4c8233627314f1e511be
Signed-off-by: default avatarAmit Nischal <anischal@codeaurora.org>
parent d7e6b0ce
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -4072,8 +4072,17 @@ static int msm_gcc_gfx_probe(struct platform_device *pdev)
	struct resource *res;
	int ret;
	u32 regval;
	struct clk *xo_clk;
	bool compat_bin = false;

	/* Require the GCC-RPM-XO clock to be registered first */
	xo_clk = devm_clk_get(&pdev->dev, "xo");
	if (IS_ERR(xo_clk)) {
		if (PTR_ERR(xo_clk) != -EPROBE_DEFER)
			dev_err(&pdev->dev, "Unable to get xo clock\n");
		return PTR_ERR(xo_clk);
	}

	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cc_base");
	if (!res) {
		dev_err(&pdev->dev, "Register base not defined\n");