linux-arm-msm.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 v2 6/6] clk: qcom: Add video clock controller driver for SC7280
Date: Tue, 13 Jul 2021 08:30:39 +0530	[thread overview]
Message-ID: <bd275558-5280-23d5-33b6-88746588e336@codeaurora.org> (raw)
In-Reply-To: <162261760498.4130789.12499425999582046146@swboyd.mtv.corp.google.com>

Hello Stephen,

Thanks for your review.

On 6/2/2021 12:36 PM, Stephen Boyd wrote:
> Quoting Taniya Das (2021-04-27 03:33:10)
>> diff --git a/drivers/clk/qcom/videocc-sc7280.c b/drivers/clk/qcom/videocc-sc7280.c
>> new file mode 100644
>> index 0000000..3387154
>> --- /dev/null
>> +++ b/drivers/clk/qcom/videocc-sc7280.c
>> @@ -0,0 +1,372 @@
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +/*
>> + * Copyright (c) 2021, The Linux Foundation. All rights reserved.
>> + */
>> +
>> +#include <linux/clk-provider.h>
>> +#include <linux/module.h>
>> +#include <linux/platform_device.h>
>> +#include <linux/regmap.h>
>> +
>> +#include <dt-bindings/clock/qcom,videocc-sc7280.h>
>> +
>> +#include "clk-alpha-pll.h"
>> +#include "clk-branch.h"
>> +#include "clk-rcg.h"
>> +#include "common.h"
>> +#include "reset.h"
>> +#include "gdsc.h"
>> +
>> +enum {
>> +       P_BI_TCXO,
>> +       P_SLEEP_CLK,
>> +       P_VIDEO_PLL0_OUT_EVEN,
>> +};
>> +
>> +static struct pll_vco lucid_vco[] = {
> 
> const?
> 

Yes, next patch will have this updated.

>> +       { 249600000, 2000000000, 0 },
>> +};
>> +
> [...]
>> +
>> +static const struct parent_map video_cc_parent_map_0[] = {
>> +       { P_BI_TCXO, 0 },
>> +       { P_VIDEO_PLL0_OUT_EVEN, 3 },
>> +};
>> +
>> +static const struct clk_parent_data video_cc_parent_data_0[] = {
>> +       { .fw_name = "bi_tcxo" },
>> +       { .hw = &video_pll0.clkr.hw },
>> +};
>> +
>> +static const struct parent_map video_cc_parent_map_1[] = {
>> +       { P_SLEEP_CLK, 0 },
>> +};
>> +
>> +static const struct clk_parent_data video_cc_parent_data_1[] = {
>> +       { .fw_name = "sleep_clk" },
>> +};
>> +
>> +static const struct parent_map video_cc_parent_map_2[] = {
>> +       { P_BI_TCXO, 0 },
>> +};
>> +
>> +static const struct clk_parent_data video_cc_parent_data_2_ao[] = {
>> +       { .fw_name = "bi_tcxo_ao" },
> 
> This is new. Why would we want the video clk parent state to turn off
> when the CPU is off? Does the video engine keep XO enabled for itself?
> Can you please add some comment into the code explaining why it's ok to
> use the ao clk here?
> 

This clock is from HW design is enabled, thus our generation scripts 
have marked it to _ao. But I will be removing this in the next patch as 
it is not required to be modelled.

>> +};
>> +
>> +static const struct freq_tbl ftbl_video_cc_iris_clk_src[] = {
>> +       F(133333333, P_VIDEO_PLL0_OUT_EVEN, 3, 0, 0),
>> +       F(240000000, P_VIDEO_PLL0_OUT_EVEN, 2, 0, 0),
>> +       F(335000000, P_VIDEO_PLL0_OUT_EVEN, 2, 0, 0),
>> +       F(424000000, P_VIDEO_PLL0_OUT_EVEN, 2, 0, 0),
>> +       F(460000000, P_VIDEO_PLL0_OUT_EVEN, 2, 0, 0),
>> +       { }
>> +};
> [...]
>> +
>> +static struct clk_branch video_cc_xo_clk = {
>> +       .halt_reg = 0x7018,
>> +       .halt_check = BRANCH_HALT,
>> +       .clkr = {
>> +               .enable_reg = 0x7018,
>> +               .enable_mask = BIT(0),
>> +               .hw.init = &(struct clk_init_data){
>> +                       .name = "video_cc_xo_clk",
>> +                       .parent_hws = (const struct clk_hw*[]){
>> +                               &video_cc_xo_clk_src.clkr.hw,
>> +                       },
>> +                       .num_parents = 1,
>> +                       .flags = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT,
> 
> Please add a comment why it is critical.
> 

Next patch will remove this clock. As it is already enabled from HW, 
will not model the clock to not disable it from SW.

>> +                       .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-07-13  3:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 10:33 [PATCH v2 0/6] Add support for DISP/VIDEO/GPU CCs for SC7280 Taniya Das
2021-04-27 10:33 ` [PATCH v2 1/6] dt-bindings: clock: Add SC7280 DISPCC clock binding Taniya Das
2021-05-03 19:18   ` Rob Herring
2021-06-02  6:55     ` Stephen Boyd
2021-06-02  6:58       ` Stephen Boyd
2021-07-13  2:56         ` Taniya Das
2021-07-13  2:55     ` Taniya Das
2021-04-27 10:33 ` [PATCH v2 2/6] clk: qcom: Add display clock controller driver for SC7280 Taniya Das
2021-04-27 10:33 ` [PATCH v2 3/6] dt-bindings: clock: Add SC7280 GPUCC clock binding Taniya Das
2021-06-02  7:00   ` Stephen Boyd
2021-07-13  2:57     ` Taniya Das
2021-04-27 10:33 ` [PATCH v2 4/6] clk: qcom: Add graphics clock controller driver for SC7280 Taniya Das
2021-04-27 10:33 ` [PATCH v2 5/6] dt-bindings: clock: Add SC7280 VideoCC clock binding Taniya Das
2021-06-02  7:00   ` Stephen Boyd
2021-04-27 10:33 ` [PATCH v2 6/6] clk: qcom: Add video clock controller driver for SC7280 Taniya Das
2021-06-02  7:06   ` Stephen Boyd
2021-07-13  3:00     ` 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=bd275558-5280-23d5-33b6-88746588e336@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).