devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Devi Priya <quic_devipriy@quicinc.com>,
	agross@kernel.org, andersson@kernel.org, arnd@arndb.de,
	broonie@kernel.org, catalin.marinas@arm.com,
	devicetree@vger.kernel.org, dmitry.baryshkov@linaro.org,
	konrad.dybcio@linaro.org, krzysztof.kozlowski+dt@linaro.org,
	linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	marcel.ziswiler@toradex.com, mturquette@baylibre.com,
	nfraprado@collabora.com, p.zabel@pengutronix.de,
	robh+dt@kernel.org, shawnguo@kernel.org, will@kernel.org
Cc: quic_srichara@quicinc.com, quic_gokulsri@quicinc.com,
	quic_sjaganat@quicinc.com, quic_kathirav@quicinc.com,
	quic_arajkuma@quicinc.com, quic_anusha@quicinc.com,
	quic_poovendh@quicinc.com
Subject: Re: [PATCH V10 2/4] clk: qcom: Add Global Clock Controller driver for IPQ9574
Date: Mon, 27 Mar 2023 09:48:47 -0700	[thread overview]
Message-ID: <0af15083921c5d3c89392209654f0c9b.sboyd@kernel.org> (raw)
In-Reply-To: <20230327132718.573-3-quic_devipriy@quicinc.com>

Quoting Devi Priya (2023-03-27 06:27:16)
> diff --git a/drivers/clk/qcom/gcc-ipq9574.c b/drivers/clk/qcom/gcc-ipq9574.c
> new file mode 100644
> index 000000000000..b2a2d618a5ec
> --- /dev/null
> +++ b/drivers/clk/qcom/gcc-ipq9574.c
> @@ -0,0 +1,4248 @@
> +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +/*
> + * Copyright (c) 2023 The Linux Foundation. All rights reserved.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/err.h>
> +#include <linux/platform_device.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/of_device.h>

What is this include for?

> +#include <linux/regmap.h>

Need to include clk-provider.h

> +
> +#include <linux/reset-controller.h>

Put a newline here.

> +#include <dt-bindings/clock/qcom,ipq9574-gcc.h>
> +#include <dt-bindings/reset/qcom,ipq9574-gcc.h>
> +
> +#include "clk-rcg.h"
> +#include "clk-branch.h"
> +#include "clk-alpha-pll.h"
> +#include "clk-regmap-divider.h"
> +#include "clk-regmap-mux.h"
> +#include "clk-regmap-phy-mux.h"
> +#include "reset.h"
> +
> +/* Need to match the order of clocks in DT binding */
> +enum {
> +       DT_XO,
> +       DT_SLEEP_CLK,
> +       DT_BIAS_PLL_UBI_NC_CLK,
> +       DT_PCIE30_PHY0_PIPE_CLK,
> +       DT_PCIE30_PHY1_PIPE_CLK,
> +       DT_PCIE30_PHY2_PIPE_CLK,
> +       DT_PCIE30_PHY3_PIPE_CLK,
> +       DT_USB3PHY_0_CC_PIPE_CLK,
> +};
> +
> +enum {
> +       P_XO,
> +       P_PCIE30_PHY0_PIPE,
> +       P_PCIE30_PHY1_PIPE,
> +       P_PCIE30_PHY2_PIPE,
> +       P_PCIE30_PHY3_PIPE,
> +       P_USB3PHY_0_PIPE,
> +       P_GPLL0,
> +       P_GPLL0_DIV2,
> +       P_GPLL0_OUT_AUX,
> +       P_GPLL2,
> +       P_GPLL4,
> +       P_PI_SLEEP,
> +       P_BIAS_PLL_UBI_NC_CLK,
> +};
> +
> +static const struct parent_map gcc_xo_map[] = {
> +       { P_XO, 0 },
> +};
> +
> +static const struct clk_parent_data gcc_xo_data[] = {
> +       { .index = DT_XO },
> +};
> +
> +static const struct clk_parent_data gcc_sleep_clk_data[] = {
> +       { .index = DT_SLEEP_CLK },
> +};
> +
> +static struct clk_alpha_pll gpll0_main = {
> +       .offset = 0x20000,
> +       .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
> +       .clkr = {
> +               .enable_reg = 0x0b000,
> +               .enable_mask = BIT(0),
> +               .hw.init = &(struct clk_init_data) {

All these clk_init_data structs should be const.

> +                       .name = "gpll0_main",
> +                       .parent_data = gcc_xo_data,
> +                       .num_parents = ARRAY_SIZE(gcc_xo_data),
> +                       .ops = &clk_alpha_pll_ops,
> +               },
> +       },
> +};

  reply	other threads:[~2023-03-27 16:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 13:27 [PATCH V10 0/4] Add minimal boot support for IPQ9574 Devi Priya
2023-03-27 13:27 ` [PATCH V10 1/4] dt-bindings: clock: Add ipq9574 clock and reset definitions Devi Priya
2023-03-27 13:27 ` [PATCH V10 2/4] clk: qcom: Add Global Clock Controller driver for IPQ9574 Devi Priya
2023-03-27 16:48   ` Stephen Boyd [this message]
2023-03-28  6:15     ` Devi Priya
2023-03-28 16:59       ` Stephen Boyd
2023-03-30  9:17         ` Devi Priya
2023-03-27 13:27 ` [PATCH V10 3/4] arm64: dts: qcom: Add support for ipq9574 SoC and RDP433 variant Devi Priya
2023-03-27 14:45   ` Dmitry Baryshkov
2023-03-28  7:31     ` Devi Priya
2023-03-28  8:42       ` Konrad Dybcio
2023-03-28 10:39       ` Dmitry Baryshkov
2023-03-31 12:22         ` Devi Priya
2023-03-27 13:27 ` [PATCH V10 4/4] arm64: defconfig: Enable IPQ9574 SoC base configs Devi Priya

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=0af15083921c5d3c89392209654f0c9b.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=konrad.dybcio@linaro.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=marcel.ziswiler@toradex.com \
    --cc=mturquette@baylibre.com \
    --cc=nfraprado@collabora.com \
    --cc=p.zabel@pengutronix.de \
    --cc=quic_anusha@quicinc.com \
    --cc=quic_arajkuma@quicinc.com \
    --cc=quic_devipriy@quicinc.com \
    --cc=quic_gokulsri@quicinc.com \
    --cc=quic_kathirav@quicinc.com \
    --cc=quic_poovendh@quicinc.com \
    --cc=quic_sjaganat@quicinc.com \
    --cc=quic_srichara@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=will@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).