Messages in this thread | | | Date | Fri, 03 Oct 2014 10:49:23 -0700 | From | Stephen Boyd <> | Subject | Re: [PATCH v1] clk: qcom: Add support for regmap clock dividers |
| |
On 10/03/14 08:13, Georgi Djakov wrote: > On 10/02/2014 09:11 PM, Stephen Boyd wrote: >> On 09/30/14 10:20, Georgi Djakov wrote: >> + unsigned long parent_rate) >> +{ >> + struct clk_regmap *rclk = to_clk_regmap(hw); >> + struct clkdiv_regmap *clkdiv = to_clkdiv_regmap(rclk); >> + unsigned int div, val; >> + >> + regmap_read(rclk->regmap, clkdiv->reg, &val); >> + if (!val) >> + return parent_rate; >> + >> + div = (val >> clkdiv->shift) & ((1 << clkdiv->width)-1); >> + >> + return parent_rate / div; >> I don't know if you saw the patch to split out the clk-divider.c logic >> from the readl/writel patch I sent[1]? That could make this slightly >> smaller. >> tabl > Could you please provide a link to that patch?
Doh, here it is: https://lkml.org/lkml/2014/9/5/762
-- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
| |