summaryrefslogtreecommitdiffstats
path: root/drivers/clk/qcom/gcc-ipq806x.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2015-10-26 18:10:09 -0700
committerStephen Boyd <sboyd@codeaurora.org>2015-11-16 11:07:06 -0800
commita085f877a882b465fce74188c9d8efd12bd5acd4 (patch)
tree2183cbd18147e908fcdcfdf800f663d532f49878 /drivers/clk/qcom/gcc-ipq806x.c
parentee15faffef11309219aa87a24efc86f6dd13f7cb (diff)
downloadop-kernel-dev-a085f877a882b465fce74188c9d8efd12bd5acd4.zip
op-kernel-dev-a085f877a882b465fce74188c9d8efd12bd5acd4.tar.gz
clk: qcom: Move cxo/pxo/xo into dt files
Put these clocks into the dt files instead of registering them from C code. This provides a few benefits. It allows us to specify the frequency of these clocks at the board level instead of hard-coding them in the driver. It allows us to insert an RPM clock in between the consumers of the crystals and the actual clock. And finally, it helps us transition the GCC driver to use RPM clocks when that configuration is enabled. Cc: Georgi Djakov <georgi.djakov@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/qcom/gcc-ipq806x.c')
-rw-r--r--drivers/clk/qcom/gcc-ipq806x.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/clk/qcom/gcc-ipq806x.c b/drivers/clk/qcom/gcc-ipq806x.c
index 16fc64c..dd5402b 100644
--- a/drivers/clk/qcom/gcc-ipq806x.c
+++ b/drivers/clk/qcom/gcc-ipq806x.c
@@ -3023,19 +3023,17 @@ MODULE_DEVICE_TABLE(of, gcc_ipq806x_match_table);
static int gcc_ipq806x_probe(struct platform_device *pdev)
{
- struct clk *clk;
struct device *dev = &pdev->dev;
struct regmap *regmap;
int ret;
- /* Temporary until RPM clocks supported */
- clk = clk_register_fixed_rate(dev, "cxo", NULL, CLK_IS_ROOT, 25000000);
- if (IS_ERR(clk))
- return PTR_ERR(clk);
+ ret = qcom_cc_register_board_clk(dev, "cxo_board", "cxo", 19200000);
+ if (ret)
+ return ret;
- clk = clk_register_fixed_rate(dev, "pxo", NULL, CLK_IS_ROOT, 25000000);
- if (IS_ERR(clk))
- return PTR_ERR(clk);
+ ret = qcom_cc_register_board_clk(dev, "pxo_board", "pxo", 27000000);
+ if (ret)
+ return ret;
ret = qcom_cc_probe(pdev, &gcc_ipq806x_desc);
if (ret)
OpenPOWER on IntegriCloud