]> git.karo-electronics.de Git - linux-beck.git/commitdiff
clk: qcom: msm8916: Move xo and sleep clocks into DT
authorGeorgi Djakov <georgi.djakov@linaro.org>
Thu, 19 Nov 2015 13:57:56 +0000 (15:57 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Sat, 21 Nov 2015 00:40:47 +0000 (16:40 -0800)
Move the xo and sleep clocks to device-tree, instead of hard-coding
them in the driver. This allows us to insert the RPM clocks (if they
are enabled) in between the on-board oscillators and the actual clock.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/qcom/gcc-msm8916.c

index 998f773d9ad912d6c3e060c4df6c13fdf31de2f7..e3bf09d7d0ef07f5672f9933dca6dd6896daff4c 100644 (file)
@@ -3357,18 +3357,16 @@ MODULE_DEVICE_TABLE(of, gcc_msm8916_match_table);
 
 static int gcc_msm8916_probe(struct platform_device *pdev)
 {
-       struct clk *clk;
+       int ret;
        struct device *dev = &pdev->dev;
 
-       /* Temporary until RPM clocks supported */
-       clk = clk_register_fixed_rate(dev, "xo", NULL, CLK_IS_ROOT, 19200000);
-       if (IS_ERR(clk))
-               return PTR_ERR(clk);
+       ret = qcom_cc_register_board_clk(dev, "xo_board", "xo", 19200000);
+       if (ret)
+               return ret;
 
-       clk = clk_register_fixed_rate(dev, "sleep_clk_src", NULL,
-                                     CLK_IS_ROOT, 32768);
-       if (IS_ERR(clk))
-               return PTR_ERR(clk);
+       ret = qcom_cc_register_sleep_clk(dev);
+       if (ret)
+               return ret;
 
        return qcom_cc_probe(pdev, &gcc_msm8916_desc);
 }