]> www.infradead.org Git - users/willy/xarray.git/commitdiff
clk: qcom: Add xo dummy clk on msm8998
authorStephen Boyd <sboyd@kernel.org>
Wed, 5 Dec 2018 23:48:45 +0000 (15:48 -0800)
committerStephen Boyd <sboyd@kernel.org>
Wed, 5 Dec 2018 23:49:43 +0000 (15:49 -0800)
We have this dummy factor clk in place to workaround a missing rpm clk
driver that can manage the XO clk state. Add it in to match what we do
on msm8996.

Cc: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: Marc Gonzalez <marc.w.gonzalez@free.fr>
Tested-by: Jeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/qcom/gcc-msm8998.c

index c3bb9fffd040ead0a6998b21a99c2f67cee01062..d72b908137e292d3b3dc1b1cb49eedb35614677c 100644 (file)
@@ -117,6 +117,17 @@ static const char * const gcc_parent_names_5[] = {
        "core_bi_pll_test_se",
 };
 
+static struct clk_fixed_factor xo = {
+       .mult = 1,
+       .div = 1,
+       .hw.init = &(struct clk_init_data){
+               .name = "xo",
+               .parent_names = (const char *[]){ "xo_board" },
+               .num_parents = 1,
+               .ops = &clk_fixed_factor_ops,
+       },
+};
+
 static struct pll_vco fabia_vco[] = {
        { 250000000, 2000000000, 0 },
        { 125000000, 1000000000, 1 },
@@ -2798,6 +2809,10 @@ static int gcc_msm8998_probe(struct platform_device *pdev)
        if (ret)
                return ret;
 
+       ret = devm_clk_hw_register(&pdev->dev, &xo.hw);
+       if (ret)
+               return ret;
+
        return qcom_cc_really_probe(pdev, &gcc_msm8998_desc, regmap);
 }