lkml.org 
[lkml]   [2015]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/4] clk: qcom: Add support for RCGs with shared branches
On 08/13, Georgi Djakov wrote:
> diff --git a/drivers/clk/qcom/clk-rcg.h b/drivers/clk/qcom/clk-rcg.h
> index 56028bb31d87..0693b9e0b15e 100644
> --- a/drivers/clk/qcom/clk-rcg.h
> +++ b/drivers/clk/qcom/clk-rcg.h
> @@ -153,8 +153,8 @@ extern const struct clk_ops clk_dyn_rcg_ops;
> * @hid_width: number of bits in half integer divider
> * @parent_map: map from software's parent index to hardware's src_sel field
> * @freq_tbl: frequency table
> + * @current_freq: last cached frequency when using branches with shared RCGs
> * @clkr: regmap clock handle
> - * @lock: register lock

Thanks.

> *
> */
> struct clk_rcg2 {
> diff --git a/drivers/clk/qcom/clk-rcg2.c b/drivers/clk/qcom/clk-rcg2.c
> index 9aec1761fd29..681faf2dcdc5 100644
> --- a/drivers/clk/qcom/clk-rcg2.c
> +++ b/drivers/clk/qcom/clk-rcg2.c
> +
> +static int clk_rcg2_shared_enable(struct clk_hw *hw)
> +{
> + struct clk_rcg2 *rcg = to_clk_rcg2(hw);
> + const char *name = clk_hw_get_name(hw);
> +
> + if (!rcg->current_freq) {
> + pr_err("%s: Please set rate before enabling\n", name);

Why? Can't we find the current freq during recalc_rate?

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project


\
 
 \ /
  Last update: 2015-09-10 01:01    [W:0.104 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site