From: Dmitry Osipenko <digetx@gmail.com>
To: Peter De Schrijver <pdeschrijver@nvidia.com>,
Stephen Boyd <sboyd@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Prashant Gaikwad <pgaikwad@nvidia.com>,
linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] clk: tegra: divider: Add missing check for enable-bit on rate's recalculation
Date: Mon, 23 Sep 2019 00:47:21 +0300 [thread overview]
Message-ID: <4f2695ce-f683-2e4b-34b9-8937feee5e1b@gmail.com> (raw)
In-Reply-To: <20190723025245.27754-1-digetx@gmail.com>
23.07.2019 5:52, Dmitry Osipenko пишет:
> Unset "enable" bit means that divider is in bypass mode, hence it doesn't
> have any effect in that case. Please note that there are no known bugs
> caused by the missing check.
>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>
> Changelog:
>
> v2: Changed the commit's description from 'Fix' to 'Add' in response to the
> Stephen's Boyd question about the need to backport the patch into stable
> kernels. The backporting is not really needed.
>
> drivers/clk/tegra/clk-divider.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/tegra/clk-divider.c b/drivers/clk/tegra/clk-divider.c
> index e76731fb7d69..f33c19045386 100644
> --- a/drivers/clk/tegra/clk-divider.c
> +++ b/drivers/clk/tegra/clk-divider.c
> @@ -40,8 +40,13 @@ static unsigned long clk_frac_div_recalc_rate(struct clk_hw *hw,
> int div, mul;
> u64 rate = parent_rate;
>
> - reg = readl_relaxed(divider->reg) >> divider->shift;
> - div = reg & div_mask(divider);
> + reg = readl_relaxed(divider->reg);
> +
> + if ((divider->flags & TEGRA_DIVIDER_UART) &&
> + !(reg & PERIPH_CLK_UART_DIV_ENB))
> + return rate;
> +
> + div = (reg >> divider->shift) & div_mask(divider);
>
> mul = get_mul(divider);
> div += mul;
>
Hello Peter,
ACK?
next prev parent reply other threads:[~2019-09-22 22:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 2:52 Dmitry Osipenko
2019-07-23 2:52 ` [PATCH v2 2/2] clk: tegra: divider: Support enable-bit for Super clocks Dmitry Osipenko
2019-10-28 14:41 ` Peter De Schrijver
2019-10-29 13:20 ` Dmitry Osipenko
2019-09-22 21:47 ` Dmitry Osipenko [this message]
2019-10-28 14:27 ` [PATCH v2 1/2] clk: tegra: divider: Add missing check for enable-bit on rate's recalculation Peter De Schrijver
2019-10-29 0:14 ` Dmitry Osipenko
2019-10-29 12:50 ` Dmitry Osipenko
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=4f2695ce-f683-2e4b-34b9-8937feee5e1b@gmail.com \
--to=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=pdeschrijver@nvidia.com \
--cc=pgaikwad@nvidia.com \
--cc=sboyd@kernel.org \
--cc=thierry.reding@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®