From: Stephen Boyd <sboyd@codeaurora.org>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Mike Turquette <mturquette@linaro.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: fractional-divider: support for divider bypassing
Date: Mon, 02 Feb 2015 11:42:55 -0800 [thread overview]
Message-ID: <54CFD33F.3000103@codeaurora.org> (raw)
In-Reply-To: <1422884224-21748-1-git-send-email-heikki.krogerus@linux.intel.com>
On 02/02/15 05:37, Heikki Krogerus wrote:
> If the divider or multiplier values values are 0 in the
s/values//
> register, bypassing the divider and returning the parent
> clock rate in clk_fd_recalc_rate().
>
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
> drivers/clk/clk-fractional-divider.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/clk/clk-fractional-divider.c b/drivers/clk/clk-fractional-divider.c
> index dc91da7..34d6c51 100644
> --- a/drivers/clk/clk-fractional-divider.c
> +++ b/drivers/clk/clk-fractional-divider.c
> @@ -36,6 +36,9 @@ static unsigned long clk_fd_recalc_rate(struct clk_hw *hw,
> m = (val & fd->mmask) >> fd->mshift;
> n = (val & fd->nmask) >> fd->nshift;
>
> + if (!n || !m)
> + return parent_rate;
> +
> ret = (u64)parent_rate * m;
> do_div(ret, n);
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2015-02-02 19:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-02 13:37 [PATCH] clk: fractional-divider: support for divider bypassing Heikki Krogerus
2015-02-02 19:42 ` Stephen Boyd [this message]
2015-02-25 20:13 ` Mike Turquette
2015-02-25 20:16 ` Mike Turquette
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54CFD33F.3000103@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.