From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3 4/8] clk: core: support clocks which requires parents enable (part 2)
Date: Fri, 1 Jul 2016 17:45:04 -0700 [thread overview]
Message-ID: <20160702004504.GM27880@codeaurora.org> (raw)
In-Reply-To: <1467279078-2330-5-git-send-email-aisheng.dong@nxp.com>
On 06/30, Dong Aisheng wrote:
> On Freescale i.MX7D platform, all clocks operations, including
> enable/disable, rate change and re-parent, requires its parent clock on.
> Current clock core can not support it well.
> This patch adding flag CLK_OPS_PARENT_ENABLE to handle this special case in
> clock core that enable its parent clock firstly for each operation and
> disable it later after operation complete.
>
> The patch part 2 fixes set clock rate and set parent while its parent
> is off. The most special case is for set_parent() operation which requires
> all parents including both old and new one to be enabled at the same time
> during the operation.
>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> ---
Applied to clk-next
> @@ -1502,6 +1514,9 @@ static void clk_change_rate(struct clk_core *core)
>
> trace_clk_set_rate(core, core->new_rate);
>
> + if (core->flags & CLK_OPS_PARENT_ENABLE)
> + clk_core_prepare_enable(parent);
> +
I swapped this with trace_clk_set_rate() so the tracepoint is
closer to the hw operation.
> if (!skip_set_rate && core->ops->set_rate)
> core->ops->set_rate(core->hw, core->new_rate, best_parent_rate);
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2016-07-02 0:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-30 9:31 [PATCH V3 0/8] clk: core: support clocks which requires parents enable Dong Aisheng
2016-06-30 9:31 ` [PATCH V3 1/8] clk: introduce clk_core_enable_lock and clk_core_disable_lock functions Dong Aisheng
2016-07-02 0:44 ` Stephen Boyd
2016-06-30 9:31 ` [PATCH V3 2/8] clk: move clk_disable_unused after clk_core_disable_unprepare function Dong Aisheng
2016-07-02 0:44 ` Stephen Boyd
2016-06-30 9:31 ` [PATCH V3 3/8] clk: core: support clocks which requires parents enable (part 1) Dong Aisheng
2016-07-02 0:44 ` Stephen Boyd
2016-06-30 9:31 ` [PATCH V3 4/8] clk: core: support clocks which requires parents enable (part 2) Dong Aisheng
2016-07-02 0:45 ` Stephen Boyd [this message]
2016-06-30 9:31 ` [PATCH V3 5/8] clk: imx: re-order and concentrate the same type of clk api Dong Aisheng
2016-07-02 0:45 ` Stephen Boyd
2016-06-30 9:31 ` [PATCH V3 6/8] clk: imx: add clk api for supporting CLK_OPS_PARENT_ENABLE clocks Dong Aisheng
2016-07-02 0:45 ` Stephen Boyd
2016-06-30 9:31 ` [PATCH V3 7/8] clk: imx7d: using api with flag CLK_OPS_PARENT_ENABLE Dong Aisheng
2016-07-02 0:45 ` Stephen Boyd
2016-06-30 9:31 ` [PATCH V3 8/8] clk: imx7d: only enable minimum required clocks Dong Aisheng
2016-07-02 0:45 ` 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=20160702004504.GM27880@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).