devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bhupesh.sharma@linaro.org
To: Anusha Rao <quic_anusha@quicinc.com>,
	agross@kernel.org, andersson@kernel.org,
	konrad.dybcio@linaro.org, thara.gopinath@gmail.com,
	herbert@gondor.apana.org.au, davem@davemloft.net,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	conor+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org,
	p.zabel@pengutronix.de, linux-arm-msm@vger.kernel.org,
	linux-crypto@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	quic_srichara@quicinc.com, quic_gokulsri@quicinc.com,
	quic_sjaganat@quicinc.com, quic_kathirav@quicinc.com,
	quic_arajkuma@quicinc.com, quic_poovendh@quicinc.com
Subject: Re: [PATCH V3 2/4] clk: qcom: gcc-ipq9574: Enable crypto clocks
Date: Mon, 22 May 2023 14:28:28 +0530	[thread overview]
Message-ID: <c451dc43-b5a2-df42-c4a5-0db4c6641b1c@linaro.org> (raw)
In-Reply-To: <20230518141105.24741-3-quic_anusha@quicinc.com>



On 5/18/23 7:41 PM, Anusha Rao <quic_anusha@quicinc.com> wrote:
> Enable the clocks required for crypto operation.
> 
> Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
> ---
>   Changes in V3:
> 	- Added GCC prefix to CRYPTO_CLK_SRC.
> 
>   drivers/clk/qcom/gcc-ipq9574.c | 72 ++++++++++++++++++++++++++++++++++
>   1 file changed, 72 insertions(+)
> 
> diff --git a/drivers/clk/qcom/gcc-ipq9574.c b/drivers/clk/qcom/gcc-ipq9574.c
> index 7b0505f5c255..73663168d72a 100644
> --- a/drivers/clk/qcom/gcc-ipq9574.c
> +++ b/drivers/clk/qcom/gcc-ipq9574.c
> @@ -728,6 +728,41 @@ static struct clk_rcg2 blsp1_uart6_apps_clk_src = {
>   	},
>   };
>   
> +static const struct freq_tbl ftbl_gcc_crypto_clk_src[] = {
> +	F(160000000, P_GPLL0, 5, 0, 0),
> +	{ }
> +};
> +
> +static struct clk_rcg2 gcc_crypto_clk_src = {
> +	.cmd_rcgr = 0x16004,
> +	.freq_tbl = ftbl_gcc_crypto_clk_src,
> +	.hid_width = 5,
> +	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
> +	.clkr.hw.init = &(const struct clk_init_data) {
> +		.name = "gcc_crypto_clk_src",
> +		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
> +		.num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2),
> +		.ops = &clk_rcg2_ops,
> +	},
> +};
> +
> +static struct clk_branch gcc_crypto_clk = {
> +	.halt_reg = 0x1600c,
> +	.halt_check = BRANCH_HALT_VOTED,
> +	.clkr = {
> +		.enable_reg = 0x0b004,
> +		.enable_mask = BIT(14),
> +		.hw.init = &(const struct clk_init_data) {
> +			.name = "gcc_crypto_clk",
> +			.parent_hws = (const struct clk_hw *[]) {
> +				&gcc_crypto_clk_src.clkr.hw },
> +			.num_parents = 1,
> +			.flags = CLK_SET_RATE_PARENT,
> +			.ops = &clk_branch2_ops,
> +		},
> +	},
> +};
> +
>   static struct clk_branch gcc_apss_ahb_clk = {
>   	.halt_reg = 0x24018,
>   	.halt_check = BRANCH_HALT_VOTED,
> @@ -2071,6 +2106,38 @@ static struct clk_rcg2 pcnoc_bfdcd_clk_src = {
>   	},
>   };
>   
> +static struct clk_branch gcc_crypto_axi_clk = {
> +	.halt_reg = 0x16010,
> +	.clkr = {
> +		.enable_reg = 0x16010,
> +		.enable_mask = BIT(0),
> +		.hw.init = &(const struct clk_init_data) {
> +			.name = "gcc_crypto_axi_clk",
> +			.parent_hws = (const struct clk_hw *[]) {
> +				&pcnoc_bfdcd_clk_src.clkr.hw },
> +			.num_parents = 1,
> +			.flags = CLK_SET_RATE_PARENT,
> +			.ops = &clk_branch2_ops,
> +		},
> +	},
> +};
> +
> +static struct clk_branch gcc_crypto_ahb_clk = {
> +	.halt_reg = 0x16014,
> +	.clkr = {
> +		.enable_reg = 0x16014,
> +		.enable_mask = BIT(0),
> +		.hw.init = &(const struct clk_init_data) {
> +			.name = "gcc_crypto_ahb_clk",
> +			.parent_hws = (const struct clk_hw *[]) {
> +				&pcnoc_bfdcd_clk_src.clkr.hw },
> +			.num_parents = 1,
> +			.flags = CLK_SET_RATE_PARENT,
> +			.ops = &clk_branch2_ops,
> +		},
> +	},
> +};
> +
>   static struct clk_branch gcc_nsscfg_clk = {
>   	.halt_reg = 0x1702c,
>   	.clkr = {
> @@ -4036,6 +4103,10 @@ static struct clk_regmap *gcc_ipq9574_clks[] = {
>   	[GCC_SNOC_PCIE1_1LANE_S_CLK] = &gcc_snoc_pcie1_1lane_s_clk.clkr,
>   	[GCC_SNOC_PCIE2_2LANE_S_CLK] = &gcc_snoc_pcie2_2lane_s_clk.clkr,
>   	[GCC_SNOC_PCIE3_2LANE_S_CLK] = &gcc_snoc_pcie3_2lane_s_clk.clkr,
> +	[GCC_CRYPTO_CLK_SRC] = &gcc_crypto_clk_src.clkr,
> +	[GCC_CRYPTO_CLK] = &gcc_crypto_clk.clkr,
> +	[GCC_CRYPTO_AXI_CLK] = &gcc_crypto_axi_clk.clkr,
> +	[GCC_CRYPTO_AHB_CLK] = &gcc_crypto_ahb_clk.clkr,
>   };

Can we please add these in alphabetical order. For e.g. here these entries would follow those for '[GCC_CMN_BLK_APU_ARES] = { 0x3a010, 2 },'

>   static const struct qcom_reset_map gcc_ipq9574_resets[] = {
> @@ -4193,6 +4264,7 @@ static const struct qcom_reset_map gcc_ipq9574_resets[] = {
>   	[GCC_WCSS_ECAHB_ARES] = { 0x25070, 0 },
>   	[GCC_WCSS_Q6_BCR] = { 0x18000, 0 },
>   	[GCC_WCSS_Q6_TBU_BCR] = { 0x12054, 0 },
> +	[GCC_CRYPTO_BCR] = { 0x16000, 0 },

Same as above.

With the above addressed:
Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>

Thanks.

>   };
>   
>   static const struct of_device_id gcc_ipq9574_match_table[] = {
> 

  reply	other threads:[~2023-05-22  8:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18 14:11 [PATCH V3 0/4] Enable crypto for ipq9574 Anusha Rao
2023-05-18 14:11 ` [PATCH V3 1/4] dt-bindings: clock: Add crypto clock and reset definitions Anusha Rao
2023-05-22  8:35   ` bhupesh.sharma
2023-05-18 14:11 ` [PATCH V3 2/4] clk: qcom: gcc-ipq9574: Enable crypto clocks Anusha Rao
2023-05-22  8:58   ` bhupesh.sharma [this message]
2023-05-24  5:31     ` Anusha Canchi
2023-05-18 14:11 ` [PATCH V3 3/4] dt-bindings: qcom-qce: add SoC compatible string for ipq9574 Anusha Rao
2023-05-22  8:36   ` bhupesh.sharma
2023-05-18 14:11 ` [PATCH V3 4/4] arm64: dts: qcom: ipq9574: Enable crypto nodes Anusha Rao
2023-05-18 14:43   ` Krzysztof Kozlowski
2023-05-22  8:53   ` bhupesh.sharma
2023-05-24  5:27     ` Anusha Canchi

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=c451dc43-b5a2-df42-c4a5-0db4c6641b1c@linaro.org \
    --to=bhupesh.sharma@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=quic_anusha@quicinc.com \
    --cc=quic_arajkuma@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=sboyd@kernel.org \
    --cc=thara.gopinath@gmail.com \
    /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).