From: Amit Nischal <anischal@codeaurora.org>
To: Stephen Boyd <sboyd@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Andy Gross <andy.gross@linaro.org>,
David Brown <david.brown@linaro.org>,
Rajendra Nayak <rnayak@codeaurora.org>,
Odelu Kukatla <okukatla@codeaurora.org>,
Taniya Das <tdas@codeaurora.org>,
linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-clk-owner@vger.kernel.org
Subject: Re: [PATCH v2 4/4] clk: qcom: Add Global Clock controller (GCC) driver for SDM845
Date: Mon, 09 Apr 2018 10:55:38 +0530 [thread overview]
Message-ID: <f6aaef343c3e6b4904e82b5693a0d135@codeaurora.org> (raw)
In-Reply-To: <152296902025.143116.550838977705296456@swboyd.mtv.corp.google.com>
On 2018-04-06 04:27, Stephen Boyd wrote:
> Quoting Amit Nischal (2018-04-03 05:24:41)
>> On 2018-03-20 06:12, Stephen Boyd wrote:
>> > Quoting Amit Nischal (2018-03-07 23:18:15)
>> >> +};
>> >> +
>> >> +static struct clk_rcg2 gcc_sdcc4_apps_clk_src = {
>> >> + .cmd_rcgr = 0x1600c,
>> >> + .mnd_width = 8,
>> >> + .hid_width = 5,
>> >> + .parent_map = gcc_parent_map_0,
>> >> + .freq_tbl = ftbl_gcc_sdcc4_apps_clk_src,
>> >> + .safe_src_freq_tbl = &cxo_safe_src_f,
>> >
>> > Why does sdcc have safe src stuff? Is something turning on the sdcc clk
>> > outside of our control?
>>
>> I will get more details on this and will get back.
>
> Any news?
>
I am removing the safe src for SDCC, but I am trying to get details from
teams as to why this was added, if it would be required I will add back
the safe src index again and submit the patch.
>>
>> >
>> >> + .clkr.hw.init = &(struct clk_init_data){
>> >> + .name = "gcc_sdcc4_apps_clk_src",
>> >> + .parent_names = gcc_parent_names_0,
>> >> + .num_parents = 4,
>> >> + .flags = CLK_SET_RATE_PARENT,
>> >> + .ops = &clk_rcg2_shared_ops,
>> >> + },
>> >> +};
>> >> +
>> > [...]
>> >> +
>> >> +static struct clk_branch gcc_video_xo_clk = {
>> >> + .halt_reg = 0xb028,
>> >> + .halt_check = BRANCH_HALT,
>> >> + .clkr = {
>> >> + .enable_reg = 0xb028,
>> >> + .enable_mask = BIT(0),
>> >> + .hw.init = &(struct clk_init_data){
>> >> + .name = "gcc_video_xo_clk",
>> >> + .flags = CLK_IS_CRITICAL,
>> >> + .ops = &clk_branch2_ops,
>> >> +
>> >
>> > These things have no parents and we mark them critical. Why are we
>> > even exposing them to the kernel? Are they not on by default? Are we
>> > going to change these to non-critical at some point in the future?
>>
>> These clocks are not enabled by default and going to video or other
>> multimedia cores so we are marking them as critical and need to expose
>> to the kernel. As of now, there is no plan to change these to
>> non-critical.
>
> Ok. Can we open code enabling these branches in the driver probe then?
> Still seems wasteful if nobody uses these.
>
> Put another way, either a driver (or other clk controller) should be
> toggling these gates at runtime or we should enable them once and leave
> them out of the framework. If the driver approach is taken, then the
> drivers should be able to turn the clks on and off to save some power.
As of now, no client driver is taking care of toggling these gates at
runtime. We want these clocks to be always on and that's why marked
them as CRITICAL so that if any user tries to unprepare/disable then
it won't happen and framework generates the warning.
Once the client drivers will take care of above, then we will submit
a cleanup patch.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-clk" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2018-04-09 5:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-08 7:18 [PATCH v2 0/4] Misc patches to support clocks for SDM845 Amit Nischal
2018-03-08 7:18 ` [PATCH v2 1/4] clk: qcom: Clear hardware clock control bit of RCG Amit Nischal
2018-03-19 22:55 ` Stephen Boyd
2018-03-26 5:19 ` Nischal, Amit
2018-03-08 7:18 ` [PATCH v2 2/4] clk: qcom: Configure the RCGs to a safe source as needed Amit Nischal
2018-03-20 0:30 ` Stephen Boyd
2018-04-03 8:52 ` Amit Nischal
2018-03-08 7:18 ` [PATCH v2 3/4] clk: qcom: Add support for controlling Fabia PLL Amit Nischal
2018-03-19 23:33 ` Stephen Boyd
2018-03-08 7:18 ` [PATCH v2 4/4] clk: qcom: Add Global Clock controller (GCC) driver for SDM845 Amit Nischal
2018-03-20 0:42 ` Stephen Boyd
2018-04-03 12:24 ` Amit Nischal
2018-04-05 22:57 ` Stephen Boyd
2018-04-09 5:25 ` Amit Nischal [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=f6aaef343c3e6b4904e82b5693a0d135@codeaurora.org \
--to=anischal@codeaurora.org \
--cc=andy.gross@linaro.org \
--cc=david.brown@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk-owner@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=okukatla@codeaurora.org \
--cc=rnayak@codeaurora.org \
--cc=sboyd@codeaurora.org \
--cc=sboyd@kernel.org \
--cc=tdas@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;
as well as URLs for NNTP newsgroup(s).