Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Abhinaba Rakshit <abhinaba.rakshit@oss.qualcomm.com>
To: Manivannan Sadhasivam <mani@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/2] soc: qcom: ice: enable ICE clock scaling API
Date: Thu, 20 Nov 2025 15:41:21 +0530	[thread overview]
Message-ID: <aR7pSQI4ZNvPmqgF@hu-arakshit-hyd.qualcomm.com> (raw)
In-Reply-To: <izxqjidbslfigzf2jiwavtyousmurrwi6c3i5rxsb3npzyaoxz@3prtbcludlqp>

On Fri, Oct 03, 2025 at 10:10:28PM +0530, Manivannan Sadhasivam wrote:
> On Wed, Oct 01, 2025 at 05:08:19PM +0530, Abhinaba Rakshit wrote:
> > Add ICE clock scaling API based on the parsed clk supported
> > frequencies from dt entry.
> > 
> 
> Explain the purpose.
> 
> > Signed-off-by: Abhinaba Rakshit <abhinaba.rakshit@oss.qualcomm.com>
> > ---
> >  drivers/soc/qcom/ice.c | 25 +++++++++++++++++++++++++
> >  include/soc/qcom/ice.h |  1 +
> >  2 files changed, 26 insertions(+)
> > 
> > diff --git a/drivers/soc/qcom/ice.c b/drivers/soc/qcom/ice.c
> > index c467b55b41744ebec0680f5112cc4bb1ba00c513..ec8d6bb9f426deee1038616282176bfc8e5b9ec1 100644
> > --- a/drivers/soc/qcom/ice.c
> > +++ b/drivers/soc/qcom/ice.c
> > @@ -97,6 +97,8 @@ struct qcom_ice {
> >  	struct clk *core_clk;
> >  	bool use_hwkm;
> >  	bool hwkm_init_complete;
> > +	u32 max_freq;
> > +	u32 min_freq;
> >  };
> >  
> >  static bool qcom_ice_check_supported(struct qcom_ice *ice)
> > @@ -514,10 +516,25 @@ int qcom_ice_import_key(struct qcom_ice *ice,
> >  }
> >  EXPORT_SYMBOL_GPL(qcom_ice_import_key);
> >  
> > +int qcom_ice_scale_clk(struct qcom_ice *ice, bool scale_up)
> > +{
> > +	int ret = 0;
> > +
> > +	if (scale_up && ice->max_freq)
> > +		ret = clk_set_rate(ice->core_clk, ice->max_freq);
> > +	else if (!scale_up && ice->min_freq)
> > +		ret = clk_set_rate(ice->core_clk, ice->min_freq);
> > +
> > +	return ret;
> > +}
> > +EXPORT_SYMBOL_GPL(qcom_ice_scale_clk);
> > +
> >  static struct qcom_ice *qcom_ice_create(struct device *dev,
> >  					void __iomem *base)
> >  {
> >  	struct qcom_ice *engine;
> > +	const __be32 *prop;
> > +	int len;
> >  
> >  	if (!qcom_scm_is_available())
> >  		return ERR_PTR(-EPROBE_DEFER);
> > @@ -549,6 +566,14 @@ static struct qcom_ice *qcom_ice_create(struct device *dev,
> >  	if (IS_ERR(engine->core_clk))
> >  		return ERR_CAST(engine->core_clk);
> >  
> > +	prop = of_get_property(dev->of_node, "freq-table-hz", &len);
> > +	if (!prop || len < 2 * sizeof(uint32_t)) {
> > +		dev_err(dev, "Freq-hz property not found or invalid length\n");
> 
> We have deprecated the 'freq-table-hz' property in favor of
> 'operating-points-v2'. So you should not be using it in new code. Also, throwing
> error in the absence of this property is a no-go.

Sure, will move the soultion using OPP-table in patchset v2.

> 
> - Mani
> 
> -- 
> மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2025-11-20 10:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-01 11:38 [PATCH 0/2] Enable UFS ICE clock scaling Abhinaba Rakshit
2025-10-01 11:38 ` [PATCH 1/2] soc: qcom: ice: enable ICE clock scaling API Abhinaba Rakshit
2025-10-02  0:21   ` Bryan O'Donoghue
2025-11-20 10:10     ` Abhinaba Rakshit
2025-10-03 16:40   ` Manivannan Sadhasivam
2025-11-20 10:11     ` Abhinaba Rakshit [this message]
2025-10-06 10:14   ` Konrad Dybcio
2025-11-20 10:12     ` Abhinaba Rakshit
2025-10-01 11:38 ` [PATCH 2/2] ufs: host: scale ICE clock Abhinaba Rakshit
2025-10-02  0:23   ` Bryan O'Donoghue
2025-11-12  6:25     ` Abhinaba Rakshit
2025-10-02  3:15   ` Bjorn Andersson
2025-11-12  6:26     ` Abhinaba Rakshit
2025-10-03 16:44   ` Manivannan Sadhasivam
2025-11-12  6:28     ` Abhinaba Rakshit
2025-10-03 16:48 ` [PATCH 0/2] Enable UFS ICE clock scaling Manivannan Sadhasivam
2025-11-12  6:35   ` Abhinaba Rakshit

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=aR7pSQI4ZNvPmqgF@hu-arakshit-hyd.qualcomm.com \
    --to=abhinaba.rakshit@oss.qualcomm.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=andersson@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=martin.petersen@oracle.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