Linux clock framework development
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: sboyd@codeaurora.org, mturquette@baylibre.com,
	romain.perier@gmail.com, linux-clk@vger.kernel.org
Subject: Re: [PATCH] clk: handle fixed-rate clocks correctly in clk_core_round_rate_nolock
Date: Sun, 26 Jul 2015 09:27:05 +0200	[thread overview]
Message-ID: <20150726092705.183a44c3@bbrezillon> (raw)
In-Reply-To: <110607065.NoWaKp3mDJ@diego>

Hi Heiko,

On Sun, 26 Jul 2015 00:18:40 +0200
Heiko St=C3=BCbner <heiko@sntech.de> wrote:

> Commit 6edc753d8ecc ("clk: change clk_ops' ->determine_rate() prototype")
> changed the behaviour of clk_core_round_rate_nolock as it forgot to also
> include the else conditional simply returning the clock rate for clocks
> that neither have a parent or can determine their rate - for example
> said fixed clocks.

Indeed.

>=20
> This resulted in failures to set pll rates on rockchip socs, as it
> returned the target pll rate as suitable rate for the 24MHz xin24m clock,
> thus making the ccf want to set this fixed clock to 1.6GHz or similar.
>=20
> Fixes: 6edc753d8ecc ("clk: change clk_ops' ->determine_rate() prototype")
> Reported-by: Romain Perier <romain.perier@gmail.com>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>

Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>

Thanks,

Boris

> ---
>  drivers/clk/clk.c | 2 ++
>  1 file changed, 2 insertions(+)
>=20
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 67f778b..819ffa6 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -802,6 +802,8 @@ static int clk_core_round_rate_nolock(struct clk_core=
 *core,
>  		req->rate =3D rate;
>  	} else if (core->flags & CLK_SET_RATE_PARENT) {
>  		return clk_core_round_rate_nolock(parent, req);
> +	} else {
> +		req->rate =3D core->rate;
>  	}
> =20
>  	return 0;



--=20
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2015-07-26  7:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-25 22:18 [PATCH] clk: handle fixed-rate clocks correctly in clk_core_round_rate_nolock Heiko Stübner
2015-07-26  7:27 ` Boris Brezillon [this message]
2015-07-26 12:16   ` Romain Perier
2015-07-28 21:34 ` 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=20150726092705.183a44c3@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=heiko@sntech.de \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=romain.perier@gmail.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