[PATCH v3 7/8] clk: qcom: msm8916: Use RPMCC if it is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The RPM clock controller driver takes care of registering the
xo clock. Do not register it in this driver if RPM is enabled.

Signed-off-by: Georgi Djakov <georgi.djakov@xxxxxxxxxx>
---
 drivers/clk/qcom/gcc-msm8916.c |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/qcom/gcc-msm8916.c b/drivers/clk/qcom/gcc-msm8916.c
index 4bb7d8415ba7..3e1062fed230 100644
--- a/drivers/clk/qcom/gcc-msm8916.c
+++ b/drivers/clk/qcom/gcc-msm8916.c
@@ -3359,13 +3359,15 @@ static int gcc_msm8916_probe(struct platform_device *pdev)
 	struct clk *clk;
 	struct device *dev = &pdev->dev;
 
-	/* Temporary until RPM clocks supported */
-	clk = clk_register_fixed_factor(dev, "xo", "xo_board", 0, 1, 1);
-	if (IS_ERR(clk))
-		return PTR_ERR(clk);
-
-	clk_register_fixed_rate(dev, "sleep_clk_src", NULL,
-				CLK_IS_ROOT, 32768);
+	if (!IS_ENABLED(CONFIG_QCOM_RPMCC)) {
+		/* RPM clocks are not enabled */
+		clk = clk_register_fixed_factor(dev, "xo", "xo_board", 0, 1, 1);
+		if (IS_ERR(clk))
+			return PTR_ERR(clk);
+
+		clk_register_fixed_rate(dev, "sleep_clk_src", NULL,
+					CLK_IS_ROOT, 32768);
+	}
 
 	return qcom_cc_probe(pdev, &gcc_msm8916_desc);
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux