clk: versatile: add min/max rate boundaries for vexpress osc clock
authorSudeep Holla <[email protected]>
Fri, 10 Nov 2017 16:06:57 +0000 (16:06 +0000)
committerStephen Boyd <[email protected]>
Fri, 16 Mar 2018 22:29:54 +0000 (15:29 -0700)
Clock framework has a provider API(clk_hw_set_rate_range) to set the
min/max rate of a clock. Use the same to set the boundaries for the
vexpress osc clock.

Cc: Michael Turquette <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: [email protected]
Signed-off-by: Sudeep Holla <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
drivers/clk/versatile/clk-vexpress-osc.c

index e7a868b83fe54e8add04ef9c59bb82ff3f23c67f..d3b5af2a02ab0d309c57a045f34382ce16f678af 100644 (file)
@@ -104,6 +104,7 @@ static int vexpress_osc_probe(struct platform_device *pdev)
                return PTR_ERR(clk);
 
        of_clk_add_provider(pdev->dev.of_node, of_clk_src_simple_get, clk);
+       clk_hw_set_rate_range(&osc->hw, osc->rate_min, osc->rate_max);
 
        dev_dbg(&pdev->dev, "Registered clock '%s'\n", init.name);