public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Turquette <mturquette@baylibre.com>
To: Stephen Boyd <sboyd@codeaurora.org>,
	"Stephen Boyd" <sboyd@codeaurora.org>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH] clk: Deprecate CLK_IS_ROOT
Date: Wed, 03 Feb 2016 21:48:03 -0800	[thread overview]
Message-ID: <20160204054803.32018.95106@quark.deferred.io> (raw)
In-Reply-To: <1454463733-25281-1-git-send-email-sboyd@codeaurora.org>

Quoting Stephen Boyd (2016-02-02 17:42:13)
> We don't use CLK_IS_ROOT but in a few places in the common clk
> framework core. Let's replace those checks with a check for the
> number of parents a clk has instead of the flag, freeing up one
> flag for something else. We don't remove the flag yet so that
> things keep building, but we'll remove it once all drivers have
> removed their flag usage.
> =

> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

Looks good to me.

Regards,
Mike

> ---
> =

> A bunch of patches to remove CLK_IS_ROOT are coming...
> =

>  drivers/clk/clk.c            | 6 +++---
>  include/linux/clk-provider.h | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> =

> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index bb01ed6cc63e..cd8382c83f48 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -385,7 +385,7 @@ static unsigned long clk_core_get_rate_nolock(struct =
clk_core *core)
>  =

>         ret =3D core->rate;
>  =

> -       if (core->flags & CLK_IS_ROOT)
> +       if (!core->num_parents)
>                 goto out;
>  =

>         if (!core->parent)
> @@ -2351,7 +2351,7 @@ static int __clk_core_init(struct clk_core *core)
>         /*
>          * Populate core->parent if parent has already been __clk_init'd.=
  If
>          * parent has not yet been __clk_init'd then place clk in the orp=
han
> -        * list.  If clk has set the CLK_IS_ROOT flag then place it in th=
e root
> +        * list.  If clk doesn't have any parents then place it in the ro=
ot
>          * clk list.
>          *
>          * Every time a new clk is clk_init'd then we walk the list of or=
phan
> @@ -2362,7 +2362,7 @@ static int __clk_core_init(struct clk_core *core)
>                 hlist_add_head(&core->child_node,
>                                 &core->parent->children);
>                 core->orphan =3D core->parent->orphan;
> -       } else if (core->flags & CLK_IS_ROOT) {
> +       } else if (!core->num_parents) {
>                 hlist_add_head(&core->child_node, &clk_root_list);
>                 core->orphan =3D false;
>         } else {
> diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
> index fabe5bedbba6..9c3a18c1a984 100644
> --- a/include/linux/clk-provider.h
> +++ b/include/linux/clk-provider.h
> @@ -25,7 +25,7 @@
>  #define CLK_SET_PARENT_GATE    BIT(1) /* must be gated across re-parent =
*/
>  #define CLK_SET_RATE_PARENT    BIT(2) /* propagate rate change up one le=
vel */
>  #define CLK_IGNORE_UNUSED      BIT(3) /* do not gate even if unused */
> -#define CLK_IS_ROOT            BIT(4) /* root clk, has no parent */
> +#define CLK_IS_ROOT            BIT(4) /* Deprecated: Don't use */
>  #define CLK_IS_BASIC           BIT(5) /* Basic clk, can't do a to_clk_fo=
o() */
>  #define CLK_GET_RATE_NOCACHE   BIT(6) /* do not use the cached clk rate =
*/
>  #define CLK_SET_RATE_NO_REPARENT BIT(7) /* don't re-parent on rate chang=
e */
> -- =

> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>=20

      reply	other threads:[~2016-02-04  5:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03  1:42 [PATCH] clk: Deprecate CLK_IS_ROOT Stephen Boyd
2016-02-04  5:48 ` Michael Turquette [this message]

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=20160204054803.32018.95106@quark.deferred.io \
    --to=mturquette@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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