clk: tegra: Propagate clk_out_x rate to parent
authorAlex Frid <afrid@nvidia.com>
Wed, 22 Mar 2017 13:38:19 +0000 (15:38 +0200)
committerThierry Reding <treding@nvidia.com>
Tue, 4 Apr 2017 14:00:28 +0000 (16:00 +0200)
Given that externx can only be used as a parent for clk_out_x, it makes
sense to propagate requests to make clk_out_x easier to handle.

Signed-off-by: Alex Frid <afrid@nvidia.com>
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/clk/tegra/clk-tegra-pmc.c

index 91377abfefa19189f82ba32e12a6e0484ed8f9c9..a35579a3f884fbd3fa920e6d30950144c385c3f2 100644 (file)
@@ -95,7 +95,8 @@ void __init tegra_pmc_clk_init(void __iomem *pmc_base,
                        continue;
 
                clk = clk_register_mux(NULL, data->mux_name, data->parents,
-                               data->num_parents, CLK_SET_RATE_NO_REPARENT,
+                               data->num_parents,
+                               CLK_SET_RATE_NO_REPARENT | CLK_SET_RATE_PARENT,
                                pmc_base + PMC_CLK_OUT_CNTRL, data->mux_shift,
                                3, 0, &clk_out_lock);
                *dt_clk = clk;
@@ -106,7 +107,8 @@ void __init tegra_pmc_clk_init(void __iomem *pmc_base,
                        continue;
 
                clk = clk_register_gate(NULL, data->gate_name, data->mux_name,
-                                       0, pmc_base + PMC_CLK_OUT_CNTRL,
+                                       CLK_SET_RATE_PARENT,
+                                       pmc_base + PMC_CLK_OUT_CNTRL,
                                        data->gate_shift, 0, &clk_out_lock);
                *dt_clk = clk;
                clk_register_clkdev(clk, data->dev_name, data->gate_name);