aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2016-03-16 15:54:55 -0400
committerStephen Boyd <sboyd@codeaurora.org>2016-04-15 20:26:18 -0400
commitc5cc2a0bc930f1ae00b198aeb752acc3bdd4d5a7 (patch)
tree3ea618128d355ba5553f2af10e8eb8ad6555b4d0 /drivers/clk
parentfefe0535b74f7d577af9310cf3741b4960a6687f (diff)
clk: ti: dpll: add support for specifying max rate for DPLLs
DPLLs typically have a maximum rate they can support, and this varies from DPLL to DPLL. Add support of the maximum rate value to the DPLL data struct, and also add check for this in the DPLL round_rate function. Signed-off-by: Tero Kristo <t-kristo@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/ti/clkt_dpll.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clk/ti/clkt_dpll.c b/drivers/clk/ti/clkt_dpll.c
index 032c658a5f5e..b919fdfe8256 100644
--- a/drivers/clk/ti/clkt_dpll.c
+++ b/drivers/clk/ti/clkt_dpll.c
@@ -301,6 +301,9 @@ long omap2_dpll_round_rate(struct clk_hw *hw, unsigned long target_rate,
301 301
302 dd = clk->dpll_data; 302 dd = clk->dpll_data;
303 303
304 if (dd->max_rate && target_rate > dd->max_rate)
305 target_rate = dd->max_rate;
306
304 ref_rate = clk_hw_get_rate(dd->clk_ref); 307 ref_rate = clk_hw_get_rate(dd->clk_ref);
305 clk_name = clk_hw_get_name(hw); 308 clk_name = clk_hw_get_name(hw);
306 pr_debug("clock: %s: starting DPLL round_rate, target rate %lu\n", 309 pr_debug("clock: %s: starting DPLL round_rate, target rate %lu\n",