From: Stephen Boyd <sboyd@codeaurora.org>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
Mike Turquette <mturquette@linaro.org>,
Russell King <linux@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org,
Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Subject: Re: [RFC] clk: Make clk API return per-user struct clk instances
Date: Mon, 29 Sep 2014 18:40:23 -0700 [thread overview]
Message-ID: <542A0A07.8040205@codeaurora.org> (raw)
In-Reply-To: <1412014643-29099-1-git-send-email-tomeu.vizoso@collabora.com>
On 09/29/14 11:17, Tomeu Vizoso wrote:
> Also moves clock state to struct clk_core, but takes care to change as little
> API as possible.
>
> struct clk_hw still has a pointer to a struct clk, which is the
> implementation's per-user clk instance, for backwards compatibility.
>
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
>
> ---
>
> Hello,
>
> I'm sending this alternate implementation of the switch to per-user clocks,
> with the added goal of not requiring any substantial changes to existing users
> of the API.
>
> This is pretty much RFC-quality right now, having only tested that it builds on
> tegra_defconfig.
>
> My main question right now is what do we want to do with those drivers that
> statically declare clocks. State is now in struct clk_core, so updating the
> drivers accordingly will amount to a substantial amount of lines changed, which
> we are now trying to avoid.
Who's actually using the static clocks? Isn't it just omap2? It looks
like all of those are behind the DEFINE_CLK define so changing it in
clk-private.h should "just work". I'm lost as to why static clocks are
being used there though. If it was a problem with allocating memory too
early it doesn't seem to be the case given that sometimes the .parents
field isn't set for a mux and __clk_init() will go and allocate an array
of pointers. Maybe I missed something though.
>
> Thanks,
>
> Tomeu
> ---
> drivers/clk/clk-composite.c | 12 +-
> drivers/clk/clk.c | 573 +++++++++++++++++++++++++++----------------
> drivers/clk/clk.h | 5 +
> drivers/clk/clkdev.c | 20 +-
> drivers/clk/tegra/clk.c | 2 +-
> include/linux/clk-private.h | 20 +-
> include/linux/clk-provider.h | 22 +-
> include/linux/clkdev.h | 2 +-
> 8 files changed, 410 insertions(+), 246 deletions(-)
>
> diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c
> index b9355da..cb4a09d 100644
> --- a/drivers/clk/clk-composite.c
> +++ b/drivers/clk/clk-composite.c
> @@ -57,14 +57,14 @@ static unsigned long clk_composite_recalc_rate(struct clk_hw *hw,
>
> static long clk_composite_determine_rate(struct clk_hw *hw, unsigned long rate,
> unsigned long *best_parent_rate,
> - struct clk **best_parent_p)
> + struct clk_core **best_parent_p)
We should avoid exposing clk_core to anything besides clk.c or users of
clk-private.h (the latter which should go away once we remove all static
clocks).
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2014-09-30 1:40 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 18:40 [PATCH v13 0/9] Per-user clock constraints Tomeu Vizoso
2014-09-23 18:40 ` Tomeu Vizoso
2014-09-23 18:40 ` [PATCH v13 1/9] clk: Add temporary mapping to the existing API Tomeu Vizoso
2014-09-23 18:40 ` Tomeu Vizoso
2014-09-23 18:42 ` [PATCH v13 2/9] clk: Move all drivers to use internal API Tomeu Vizoso
2014-09-23 18:42 ` Tomeu Vizoso
2014-09-23 18:44 ` [PATCH v13 3/9] clk: use struct clk only for external API Tomeu Vizoso
2014-09-23 18:44 ` Tomeu Vizoso
2014-09-23 18:44 ` [PATCH v13 4/9] clk: per-user clock accounting for debug Tomeu Vizoso
2014-09-23 18:44 ` Tomeu Vizoso
2014-09-23 18:44 ` [PATCH v13 5/9] clk: Add floor and ceiling constraints to clock rates Tomeu Vizoso
2014-09-23 18:44 ` Tomeu Vizoso
2014-09-23 18:44 ` [PATCH v13 6/9] clk: Warn of unbalanced clk_prepare() calls Tomeu Vizoso
2014-09-23 18:44 ` Tomeu Vizoso
2014-09-23 18:44 ` [PATCH v13 7/9] clk: Take the prepare lock when updating the list of per-user clks Tomeu Vizoso
2014-09-23 18:44 ` Tomeu Vizoso
2014-09-23 18:44 ` [PATCH v13 8/9] clk: Take the prepare lock when updating the per-user constraints Tomeu Vizoso
2014-09-23 18:44 ` Tomeu Vizoso
2014-09-23 18:44 ` [PATCH v13 9/9] clk: Add docs about calling clk_put after clk_get_parent Tomeu Vizoso
2014-09-23 18:44 ` Tomeu Vizoso
2014-09-23 20:59 ` [PATCH v13 0/9] Per-user clock constraints Stephen Boyd
2014-09-23 20:59 ` Stephen Boyd
2014-09-24 8:27 ` Tomeu Vizoso
2014-09-24 8:27 ` Tomeu Vizoso
2014-09-26 1:29 ` Stephen Boyd
2014-09-26 1:29 ` Stephen Boyd
2014-09-26 8:09 ` Tomeu Vizoso
2014-09-26 8:09 ` Tomeu Vizoso
2014-09-26 23:20 ` Mike Turquette
2014-09-26 23:20 ` Mike Turquette
2014-09-27 0:15 ` Stephen Boyd
2014-09-27 0:15 ` Stephen Boyd
2014-09-29 18:17 ` [RFC] clk: Make clk API return per-user struct clk instances Tomeu Vizoso
2014-09-30 1:40 ` Stephen Boyd [this message]
2014-09-30 6:54 ` Mike Turquette
2014-09-30 7:41 ` Tero Kristo
2014-09-30 18:16 ` Tony Lindgren
2014-10-03 14:13 ` Tero Kristo
2014-09-30 9:14 ` Russell King - ARM Linux
2014-09-30 14:28 ` [RFC v2] " Tomeu Vizoso
2014-09-24 9:14 ` [PATCH v13 0/9] Per-user clock constraints Tomeu Vizoso
2014-09-24 9:14 ` Tomeu Vizoso
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=542A0A07.8040205@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=javier.martinez@collabora.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mturquette@linaro.org \
--cc=tomeu.vizoso@collabora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.