Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d536f984 authored by Deepak Katragadda's avatar Deepak Katragadda
Browse files

clk: qcom: clk-cpu-osm: Add a round_rate op for the CPU core clocks



Add a round rate callback for the silver and gold
core clocks.

Change-Id: Ief8dd93a32c92dff2ba1bf8851b110adab83f69a
Signed-off-by: default avatarDeepak Katragadda <dkatraga@codeaurora.org>
parent fd8f40e6
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -449,6 +449,17 @@ static int l3_clk_set_rate(struct clk_hw *hw, unsigned long rate,
	return 0;
}

static long cpu_clk_round_rate(struct clk_hw *hw, unsigned long rate,
					unsigned long *parent_rate)
{
	struct clk_hw *parent_hw = clk_hw_get_parent(hw);

	if (!parent_hw)
		return -EINVAL;

	return clk_hw_round_rate(parent_hw, rate);
}

static unsigned long cpu_clk_recalc_rate(struct clk_hw *hw,
					unsigned long parent_rate)
{
@@ -2516,6 +2527,7 @@ static int clk_cpu_osm_driver_probe(struct platform_device *pdev)

	clk_ops_core = clk_dummy_ops;
	clk_ops_core.set_rate = cpu_clk_set_rate;
	clk_ops_core.round_rate = cpu_clk_round_rate;
	clk_ops_core.recalc_rate = cpu_clk_recalc_rate;

	spin_lock_init(&l3_clk.lock);