From: James Hogan <james.hogan@imgtec.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>, <linux-clk@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] clk: divider: Fix clk_divider_round_rate() to use clk_readl()
Date: Fri, 12 Aug 2016 14:16:59 +0100 [thread overview]
Message-ID: <20160812131659.GR19514@jhogan-linux.le.imgtec.org> (raw)
In-Reply-To: <1471005474-32301-1-git-send-email-geert+renesas@glider.be>
[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]
On Fri, Aug 12, 2016 at 02:37:54PM +0200, Geert Uytterhoeven wrote:
> clk-divider uses clk_readl()/clk_writel() everywhere, except in
> clk_divider_round_rate(), where plain readl() is used. Change this to
> clk_readl(), as it makes a difference on powerpc.
>
> Fixes: e6d5e7d90be92cee ("clk-divider: Fix READ_ONLY when divider > 1")
Hmm yes, sorry. I don't know how I managed to do that considering the
prevalance of clk_readl() at the time.
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Thanks
James
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Found by code inspection, untested on powerpc.
> ---
> drivers/clk/clk-divider.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
> index a0f55bc1ad3d277f..96386ffc84835f12 100644
> --- a/drivers/clk/clk-divider.c
> +++ b/drivers/clk/clk-divider.c
> @@ -352,7 +352,7 @@ static long clk_divider_round_rate(struct clk_hw *hw, unsigned long rate,
>
> /* if read only, just return current value */
> if (divider->flags & CLK_DIVIDER_READ_ONLY) {
> - bestdiv = readl(divider->reg) >> divider->shift;
> + bestdiv = clk_readl(divider->reg) >> divider->shift;
> bestdiv &= div_mask(divider->width);
> bestdiv = _get_div(divider->table, bestdiv, divider->flags,
> divider->width);
> --
> 1.9.1
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-08-12 13:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-12 12:37 Geert Uytterhoeven
2016-08-12 13:16 ` James Hogan [this message]
2016-08-13 0:33 ` Stephen Boyd
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=20160812131659.GR19514@jhogan-linux.le.imgtec.org \
--to=james.hogan@imgtec.com \
--cc=geert+renesas@glider.be \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.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 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®