linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Sricharan R <quic_srichara@quicinc.com>
Cc: agross@kernel.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com,
	sboyd@kernel.org, linus.walleij@linaro.org,
	catalin.marinas@arm.com, p.zabel@pengutronix.de,
	quic_varada@quicinc.com, linux-arm-msm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V2 3/8] clk: qcom: Add Global Clock controller (GCC) driver for IPQ5018
Date: Thu, 23 Jun 2022 23:05:35 -0500	[thread overview]
Message-ID: <YrU4D+eDBctFl0ZY@builder.lan> (raw)
In-Reply-To: <20220621161126.15883-4-quic_srichara@quicinc.com>

On Tue 21 Jun 11:11 CDT 2022, Sricharan R wrote:
> diff --git a/drivers/clk/qcom/gcc-ipq5018.c b/drivers/clk/qcom/gcc-ipq5018.c
[..]
> +static const struct clk_parent_data gcc_xo_gpll0_gpll0_out_main_div2[] = {
> +	{ .fw_name = "xo", .name = "xo", },

Please replace .fw_name with .index based lookup, in line with what was
done in gcc-sc8280xp.c recently.

There's no reason to include global name lookup (.name) in new drivers,
so please omit this part.

> +	{ .fw_name = "gpll0", .name = "gpll0", },
> +	{ .fw_name = "gpll0_out_main_div2", .name = "gpll0_out_main_div2", },
> +};
> +
[..]
> +static struct clk_alpha_pll gpll0_main = {
> +	.offset = 0x21000,
> +	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
> +	.clkr = {
> +		.enable_reg = 0x0b000,
> +		.enable_mask = BIT(0),
> +		.hw.init = &(struct clk_init_data){
> +			.name = "gpll0_main",
> +			.parent_data = &(const struct clk_parent_data){
> +				.fw_name = "xo",
> +				.name = "xo",

Are you referring to the board XO here, or the CXO pin on the SoC? On
many platforms these are not the same...

Please omit the .name here as well and as this is used a few times,
please create a struct clk_parent_data for this parent.

> +			},
> +			.num_parents = 1,
> +			.ops = &clk_alpha_pll_stromer_ops,
> +			.flags = CLK_IS_CRITICAL,
> +		},
> +	},
> +};
> +
> +static struct clk_fixed_factor gpll0_out_main_div2 = {
> +	.mult = 1,
> +	.div = 2,
> +	.hw.init = &(struct clk_init_data){
> +		.name = "gpll0_out_main_div2",
> +		.parent_data = &(const struct clk_parent_data){

It would be nice to have a space inbetween ) and { in all these.

> +			.fw_name = "gpll0_main",
> +			.name = "gpll0_main",
> +		},
> +		.num_parents = 1,
> +		.ops = &clk_fixed_factor_ops,
> +		.flags = CLK_SET_RATE_PARENT,
> +	},
> +};
[..]
> +static struct clk_branch gcc_gephy_tx_clk = {
> +	.halt_reg = 0x56014,
> +	.halt_check = BRANCH_HALT_DELAY,
> +	.clkr = {
> +		.enable_reg = 0x56014,
> +		.enable_mask = BIT(0),
> +		.hw.init = &(struct clk_init_data){
> +			.name = "gcc_gephy_tx_clk",
> +			.parent_data = &(const struct clk_parent_data){
> +				.fw_name = "gmac0_tx_div_clk_src",
> +				.name = "gmac0_tx_div_clk_src",
> +			},

This parent_data is repeated multiple times, but more importantly it's
not an external clock, so you should use .parent_hw instead of
.parent_data.

Please review the parent for all your clocks.

Regards,
Bjorn

  parent reply	other threads:[~2022-06-24  4:05 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-21 16:11 [PATCH V2 0/8] Add minimal boot support for IPQ5018 Sricharan R
2022-06-21 16:11 ` [PATCH V2 1/8] clk: qcom: clk-alpha-pll: Add support for Stromer PLLs Sricharan R
2022-06-21 16:11 ` [PATCH V2 2/8] dt-bindings: arm64: ipq5018: Add binding descriptions for clock and reset Sricharan R
2022-06-22 15:04   ` Krzysztof Kozlowski
2022-06-23  6:00     ` Sricharan Ramabadhran
2022-06-24 17:26   ` Rob Herring
2022-06-21 16:11 ` [PATCH V2 3/8] clk: qcom: Add Global Clock controller (GCC) driver for IPQ5018 Sricharan R
2022-06-22 15:08   ` Krzysztof Kozlowski
2022-06-23  6:06     ` Sricharan Ramabadhran
2022-06-24  4:05   ` Bjorn Andersson [this message]
2022-06-27 19:51     ` Sricharan Ramabadhran
2022-06-28  1:28   ` kernel test robot
2022-06-21 16:11 ` [PATCH V2 4/8] dt-bindings: pinctrl: qcom: Add ipq5018 pinctrl bindings Sricharan R
2022-06-22 15:13   ` Krzysztof Kozlowski
2022-06-23  6:28     ` Sricharan Ramabadhran
2022-06-24  3:44   ` Bjorn Andersson
2022-06-24 17:26   ` Rob Herring
2022-06-21 16:11 ` [PATCH V2 5/8] pinctrl: qcom: Add IPQ5018 pinctrl driver Sricharan R
2022-06-24  3:54   ` Bjorn Andersson
2022-06-27 19:35     ` Sricharan Ramabadhran
2022-06-28  3:31   ` kernel test robot
2022-06-21 16:11 ` [PATCH V2 6/8] dt-bindings: qcom: Add ipq5018 bindings Sricharan R
2022-06-22 15:14   ` Krzysztof Kozlowski
2022-06-23  6:28     ` Sricharan Ramabadhran
2022-06-21 16:11 ` [PATCH V2 7/8] arm64: dts: Add ipq5018 SoC and MP03 board support Sricharan R
2022-06-22 15:18   ` Krzysztof Kozlowski
2022-06-23  7:19     ` Sricharan Ramabadhran
2022-06-26 18:32   ` Konrad Dybcio
2022-06-28  7:14     ` Sricharan Ramabadhran
2022-07-01  7:31       ` Konrad Dybcio
2022-06-21 16:11 ` [PATCH V2 8/8] arm64: defconfig: Enable IPQ5018 SoC base configs Sricharan R
2022-06-28 12:55 ` [PATCH V2 0/8] Add minimal boot support for IPQ5018 Linus Walleij
2022-06-29  6:51   ` Sricharan Ramabadhran

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=YrU4D+eDBctFl0ZY@builder.lan \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=quic_srichara@quicinc.com \
    --cc=quic_varada@quicinc.com \
    --cc=robh+dt@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).