[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160812131659.GR19514@jhogan-linux.le.imgtec.org>
Date: Fri, 12 Aug 2016 14:16:59 +0100
From: James Hogan <james.hogan@...tec.com>
To: Geert Uytterhoeven <geert+renesas@...der.be>
CC: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...eaurora.org>,
<linux-clk@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] clk: divider: Fix clk_divider_round_rate() to use
clk_readl()
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@...tec.com>
Thanks
James
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.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
>
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists