From: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
To: Devi Priya <quic_devipriy@quicinc.com>, Andrew Lunn <andrew@lunn.ch>
Cc: <andersson@kernel.org>, <mturquette@baylibre.com>,
<sboyd@kernel.org>, <robh@kernel.org>, <krzk+dt@kernel.org>,
<conor+dt@kernel.org>, <konrad.dybcio@linaro.org>,
<catalin.marinas@arm.com>, <will@kernel.org>,
<p.zabel@pengutronix.de>, <richardcochran@gmail.com>,
<geert+renesas@glider.be>, <dmitry.baryshkov@linaro.org>,
<neil.armstrong@linaro.org>, <arnd@arndb.de>,
<m.szyprowski@samsung.com>, <nfraprado@collabora.com>,
<u-kumar1@ti.com>, <linux-arm-msm@vger.kernel.org>,
<linux-clk@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <netdev@vger.kernel.org>
Subject: Re: [PATCH V4 5/7] clk: qcom: Add NSS clock Controller driver for IPQ9574
Date: Fri, 4 Oct 2024 13:25:52 +0530 [thread overview]
Message-ID: <29b84acf-2c57-4b0e-81f0-82eb6c1e5b18@quicinc.com> (raw)
In-Reply-To: <302298ef-7827-49e1-8b0f-04467cb38ad7@quicinc.com>
On 6/26/2024 8:09 PM, Devi Priya wrote:
>
>
> On 6/25/2024 8:09 PM, Andrew Lunn wrote:
>>> +static struct clk_alpha_pll ubi32_pll_main = {
>>> + .offset = 0x28000,
>>> + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_NSS_HUAYRA],
>>> + .flags = SUPPORTS_DYNAMIC_UPDATE,
>>> + .clkr = {
>>> + .hw.init = &(const struct clk_init_data) {
>>> + .name = "ubi32_pll_main",
>>> + .parent_data = &(const struct clk_parent_data) {
>>> + .index = DT_XO,
>>> + },
>>> + .num_parents = 1,
>>> + .ops = &clk_alpha_pll_huayra_ops,
>>> + },
>>> + },
>>> +};
>>> +
>>> +static struct clk_alpha_pll_postdiv ubi32_pll = {
>>> + .offset = 0x28000,
>>> + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_NSS_HUAYRA],
>>> + .width = 2,
>>> + .clkr.hw.init = &(const struct clk_init_data) {
>>> + .name = "ubi32_pll",
>>> + .parent_hws = (const struct clk_hw *[]) {
>>> + &ubi32_pll_main.clkr.hw
>>> + },
>>> + .num_parents = 1,
>>> + .ops = &clk_alpha_pll_postdiv_ro_ops,
>>> + .flags = CLK_SET_RATE_PARENT,
>>> + },
>>> +};
>>
>> Can these structures be made const? You have quite a few different
>> structures in this driver, some of which are const, and some which are
>> not.
>>
> Sure, will check and update this in V6
>
> Thanks,
> Devi Priya
>> Andrew
>>
Hi Andrew,
Sorry for the delayed response.
The ubi32_pll_main structure should be passed to clk_alpha_pll_configure() API to configure UBI32 PLL. clk_alpha_pll_configure() API expects a non-const structure. Declaring it as const will result in the following compilation warning
drivers/clk/qcom/nsscc-ipq9574.c:3067:26: warning: passing argument 1 of ‘clk_alpha_pll_configure’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
clk_alpha_pll_configure(&ubi32_pll_main, regmap, &ubi32_pll_config);
^
In file included from drivers/clk/qcom/nsscc-ipq9574.c:22:0:
drivers/clk/qcom/clk-alpha-pll.h:200:6: note: expected ‘struct clk_alpha_pll *’ but argument is of type ‘const struct clk_alpha_pll *’
void clk_alpha_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
^~~~~~~~~~~~~~~~~~~~~~~
The ubi32_pll is the source for nss_cc_ubi0_clk_src, nss_cc_ubi1_clk_src, nss_cc_ubi2_clk_src, nss_cc_ubi3_clk_src. Therefore, to register ubi32_pll with clock framework, it should be assigned to UBI32_PLL index of nss_cc_ipq9574_clocks array. This assignment will result in the following compilation warning if the ubi32_pll structure is declared as const.
drivers/clk/qcom/nsscc-ipq9574.c:2893:16: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
[UBI32_PLL] = &ubi32_pll.clkr,
Thanks & Regards,
Manikanta.
next prev parent reply other threads:[~2024-10-04 7:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 7:05 [PATCH V4 0/7] Add NSS clock controller support " Devi Priya
2024-06-25 7:05 ` [PATCH V4 1/7] clk: qcom: clk-alpha-pll: Add NSS HUAYRA ALPHA PLL support for ipq9574 Devi Priya
2024-06-25 7:05 ` [PATCH V4 2/7] dt-bindings: clock: gcc-ipq9574: Add definition for GPLL0_OUT_AUX Devi Priya
2024-06-25 7:05 ` [PATCH V4 3/7] clk: qcom: gcc-ipq9574: Add support for gpll0_out_aux clock Devi Priya
2024-06-25 7:05 ` [PATCH V4 4/7] dt-bindings: clock: Add ipq9574 NSSCC clock and reset definitions Devi Priya
2024-06-25 8:29 ` Rob Herring (Arm)
2024-06-25 7:05 ` [PATCH V4 5/7] clk: qcom: Add NSS clock Controller driver for IPQ9574 Devi Priya
2024-06-25 14:39 ` Andrew Lunn
2024-06-26 14:39 ` Devi Priya
2024-10-04 7:55 ` Manikanta Mylavarapu [this message]
2024-10-04 14:02 ` Andrew Lunn
2024-10-09 7:39 ` Manikanta Mylavarapu
2024-06-25 17:03 ` Konrad Dybcio
2024-06-27 5:37 ` Devi Priya
2024-06-27 15:14 ` Dmitry Baryshkov
2024-06-25 7:05 ` [PATCH V4 6/7] arm64: dts: qcom: ipq9574: Add support for nsscc node Devi Priya
2024-06-25 7:05 ` [PATCH V4 7/7] arm64: defconfig: Build NSS Clock Controller driver for IPQ9574 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=29b84acf-2c57-4b0e-81f0-82eb6c1e5b18@quicinc.com \
--to=quic_mmanikan@quicinc.com \
--cc=andersson@kernel.org \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=geert+renesas@glider.be \
--cc=konrad.dybcio@linaro.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mturquette@baylibre.com \
--cc=neil.armstrong@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=nfraprado@collabora.com \
--cc=p.zabel@pengutronix.de \
--cc=quic_devipriy@quicinc.com \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=u-kumar1@ti.com \
--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
all inboxes | Powered by JetHome®