devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taniya Das <tdas@codeaurora.org>
To: Stephen Boyd <sboyd@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>
Cc: Rajendra Nayak <rnayak@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, robh@kernel.org, robh+dt@kernel.org
Subject: Re: [PATCH v1 2/2] clk: qcom: Add Global Clock controller (GCC) driver for SC7280
Date: Wed, 10 Feb 2021 23:54:02 +0530	[thread overview]
Message-ID: <a70505c8-9d29-463f-99bb-b5c046ee8da3@codeaurora.org> (raw)
In-Reply-To: <161048188125.3661239.13161942092910464158@swboyd.mtv.corp.google.com>

Thanks Stephen for your review comments.

On 1/13/2021 1:34 AM, Stephen Boyd wrote:

>> +
>> +static struct clk_rcg2 gcc_sdcc1_apps_clk_src = {
>> +       .cmd_rcgr = 0x7500c,
>> +       .mnd_width = 8,
>> +       .hid_width = 5,
>> +       .parent_map = gcc_parent_map_8,
>> +       .freq_tbl = ftbl_gcc_sdcc1_apps_clk_src,
>> +       .clkr.hw.init = &(struct clk_init_data){
>> +               .name = "gcc_sdcc1_apps_clk_src",
>> +               .parent_data = gcc_parent_data_8,
>> +               .num_parents = ARRAY_SIZE(gcc_parent_data_8),
>> +               .flags = CLK_SET_RATE_PARENT,
>> +               .ops = &clk_rcg2_ops,
> 
> This needs to use floor clk ops?
> 

My bad I missed them in my patch, latest patch has this fixed.

>> +       },
>> +};
>> +
>> +static const struct freq_tbl ftbl_gcc_sdcc1_ice_core_clk_src[] = {
>> +       F(100000000, P_GCC_GPLL0_OUT_EVEN, 3, 0, 0),
>> +       F(150000000, P_GCC_GPLL0_OUT_EVEN, 2, 0, 0),
>> +       F(300000000, P_GCC_GPLL0_OUT_EVEN, 1, 0, 0),
>> +       { }
>> +};
>> +
>> +static struct clk_rcg2 gcc_sdcc1_ice_core_clk_src = {
>> +       .cmd_rcgr = 0x7502c,
>> +       .mnd_width = 0,
>> +       .hid_width = 5,
>> +       .parent_map = gcc_parent_map_1,
>> +       .freq_tbl = ftbl_gcc_sdcc1_ice_core_clk_src,
>> +       .clkr.hw.init = &(struct clk_init_data){
>> +               .name = "gcc_sdcc1_ice_core_clk_src",
>> +               .parent_data = gcc_parent_data_1,
>> +               .num_parents = ARRAY_SIZE(gcc_parent_data_1),
>> +               .flags = CLK_SET_RATE_PARENT,
>> +               .ops = &clk_rcg2_ops,
> 
> Same.
> 
>> +       },
>> +};
>> +
>> +static const struct freq_tbl ftbl_gcc_sdcc2_apps_clk_src[] = {
>> +       F(400000, P_BI_TCXO, 12, 1, 4),
>> +       F(19200000, P_BI_TCXO, 1, 0, 0),
>> +       F(25000000, P_GCC_GPLL0_OUT_EVEN, 12, 0, 0),
>> +       F(50000000, P_GCC_GPLL0_OUT_EVEN, 6, 0, 0),
>> +       F(100000000, P_GCC_GPLL0_OUT_EVEN, 3, 0, 0),
>> +       F(202000000, P_GCC_GPLL9_OUT_MAIN, 4, 0, 0),
>> +       { }
>> +};
>> +
>> +static struct clk_rcg2 gcc_sdcc2_apps_clk_src = {
>> +       .cmd_rcgr = 0x1400c,
>> +       .mnd_width = 8,
>> +       .hid_width = 5,
>> +       .parent_map = gcc_parent_map_9,
>> +       .freq_tbl = ftbl_gcc_sdcc2_apps_clk_src,
>> +       .clkr.hw.init = &(struct clk_init_data){
>> +               .name = "gcc_sdcc2_apps_clk_src",
>> +               .parent_data = gcc_parent_data_9,
>> +               .num_parents = ARRAY_SIZE(gcc_parent_data_9),
>> +               .flags = CLK_SET_RATE_PARENT,
>> +               .ops = &clk_rcg2_ops,
> 
> Same.
> 
>> +       },
>> +};
>> +
>> +static const struct freq_tbl ftbl_gcc_sdcc4_apps_clk_src[] = {
>> +       F(400000, P_BI_TCXO, 12, 1, 4),
>> +       F(19200000, P_BI_TCXO, 1, 0, 0),
>> +       F(25000000, P_GCC_GPLL0_OUT_EVEN, 12, 0, 0),
>> +       F(50000000, P_GCC_GPLL0_OUT_EVEN, 6, 0, 0),
>> +       F(100000000, P_GCC_GPLL0_OUT_EVEN, 3, 0, 0),
>> +       { }
>> +};
>> +
>> +static struct clk_rcg2 gcc_sdcc4_apps_clk_src = {
>> +       .cmd_rcgr = 0x1600c,
>> +       .mnd_width = 8,
>> +       .hid_width = 5,
>> +       .parent_map = gcc_parent_map_1,
>> +       .freq_tbl = ftbl_gcc_sdcc4_apps_clk_src,
>> +       .clkr.hw.init = &(struct clk_init_data){
>> +               .name = "gcc_sdcc4_apps_clk_src",
>> +               .parent_data = gcc_parent_data_1,
>> +               .num_parents = ARRAY_SIZE(gcc_parent_data_1),
>> +               .flags = CLK_SET_RATE_PARENT,
>> +               .ops = &clk_rcg2_ops,
> 
> Same.
> 
>> +       },
>> +};
>> +
> [...]
>> +static struct clk_branch gcc_cpuss_ahb_clk = {
>> +       .halt_reg = 0x48000,
>> +       .halt_check = BRANCH_HALT_VOTED,
>> +       .hwcg_reg = 0x48000,
>> +       .hwcg_bit = 1,
>> +       .clkr = {
>> +               .enable_reg = 0x52000,
>> +               .enable_mask = BIT(21),
>> +               .hw.init = &(struct clk_init_data){
>> +                       .name = "gcc_cpuss_ahb_clk",
>> +                       .parent_data = &(const struct clk_parent_data){
>> +                               .hw = &gcc_cpuss_ahb_postdiv_clk_src.clkr.hw,
>> +                       },
>> +                       .num_parents = 1,
>> +                       .flags = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT,
> 
> Why is it critical? Please add a comment like sc7180.
> 

Updated the comment in the latest patch.

>> +                       .ops = &clk_branch2_ops,
>> +               },
>> +       },
>> +};
>> +

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--

      reply	other threads:[~2021-02-10 18:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 18:48 [PATCH v1 0/2] Add Global Clock controller (GCC) driver for SC7280 Taniya Das
2020-12-15 18:48 ` [PATCH v1 1/2] dt-bindings: clock: Add SC7280 GCC clock binding Taniya Das
2020-12-21 19:00   ` Rob Herring
2021-02-10 18:21     ` Taniya Das
2021-01-12 20:06   ` Stephen Boyd
2021-02-10 18:22     ` Taniya Das
2020-12-15 18:48 ` [PATCH v1 2/2] clk: qcom: Add Global Clock controller (GCC) driver for SC7280 Taniya Das
2021-01-12 20:04   ` Stephen Boyd
2021-02-10 18:24     ` Taniya Das [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=a70505c8-9d29-463f-99bb-b5c046ee8da3@codeaurora.org \
    --to=tdas@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@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=rnayak@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.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).