Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Praveen Talari <quic_ptalari@quicinc.com>
To: Jiri Slaby <jirislaby@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
	Stephen Boyd <sboyd@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-serial@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-pm@vger.kernel.org>
Cc: <psodagud@quicinc.com>, <djaggi@quicinc.com>,
	<quic_msavaliy@quicinc.com>, <quic_vtanuku@quicinc.com>,
	<quic_arandive@quicinc.com>, <quic_mnaresh@quicinc.com>,
	<quic_shazhuss@quicinc.com>
Subject: Re: [PATCH v1 4/9] soc: qcom: geni-se: Enable QUPs on SA8255p Qualcomm platforms
Date: Mon, 14 Apr 2025 23:29:53 +0530	[thread overview]
Message-ID: <1e69b6f5-efe7-4b81-8bea-b463b1eacfd4@quicinc.com> (raw)
In-Reply-To: <abbfc13d-d6f5-485f-a73d-6a89e15f0ff6@kernel.org>


On 4/14/2025 1:26 PM, Jiri Slaby wrote:
> On 10. 04. 25, 19:40, Praveen Talari wrote:
>> On the sa8255p platform, resources such as clocks,interconnects
>> and TLMM (GPIO) configurations are managed by firmware.
>>
>> Introduce a platform data function callback to distinguish whether
>> resource control is performed by firmware or directly by the driver
>> in linux.
>>
>> The refactor ensures clear differentiation of resource
>> management mechanisms, improving maintainability and flexibility
>> in handling platform-specific configurations.
>>
>> Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
>> ---
>>   drivers/soc/qcom/qcom-geni-se.c | 78 +++++++++++++++++++++------------
>>   1 file changed, 50 insertions(+), 28 deletions(-)
>>
>> diff --git a/drivers/soc/qcom/qcom-geni-se.c 
>> b/drivers/soc/qcom/qcom-geni-se.c
>> index 4cb959106efa..5e2add1e04d3 100644
>> --- a/drivers/soc/qcom/qcom-geni-se.c
>> +++ b/drivers/soc/qcom/qcom-geni-se.c
>> @@ -105,6 +105,8 @@ struct geni_wrapper {
>>   struct geni_se_desc {
>>       unsigned int num_clks;
>>       const char * const *clks;
>> +    int (*geni_se_rsc_init)(struct geni_wrapper *wrapper,
>> +                const struct geni_se_desc *desc);
>>   };
>>     static const char * const icc_path_names[] = {"qup-core", 
>> "qup-config",
>> @@ -891,10 +893,44 @@ int geni_icc_disable(struct geni_se *se)
>>   }
>>   EXPORT_SYMBOL_GPL(geni_icc_disable);
>>   +static int geni_se_resource_init(struct geni_wrapper *wrapper,
>> +                 const struct geni_se_desc *desc)
>> +{
>> +    struct device *dev = wrapper->dev;
>> +    int ret;
>> +    int i;
>> +
>> +    wrapper->num_clks = min_t(unsigned int, desc->num_clks, MAX_CLKS);
>
> I thought min_t is no longer needed in these cases?

it is needed since there are two types of QUPs - the normal QUP which 
uses 2 clocks,

and HUB QUP which uses only 1 clock.

>
>> +
>> +    for (i = 0; i < wrapper->num_clks; ++i)
>
> FWIW i should be unsigned too.
>
> thanks,

  reply	other threads:[~2025-04-14 18:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10 17:40 [PATCH v1 0/9] Enable QUPs and Serial on SA8255p Qualcomm platforms Praveen Talari
2025-04-10 17:40 ` [PATCH v1 1/9] opp: add new helper API dev_pm_opp_set_level() Praveen Talari
2025-04-10 17:40 ` [PATCH v1 2/9] dt-bindings: serial: describe SA8255p Praveen Talari
2025-04-11 17:57   ` Rob Herring
2025-04-11 18:15     ` Praveen Talari
2025-04-10 17:40 ` [PATCH v1 3/9] dt-bindings: qcom: geni-se: " Praveen Talari
2025-04-10 18:34   ` Rob Herring (Arm)
2025-04-10 17:40 ` [PATCH v1 4/9] soc: qcom: geni-se: Enable QUPs on SA8255p Qualcomm platforms Praveen Talari
2025-04-11 18:40   ` kernel test robot
2025-04-11 18:40   ` kernel test robot
2025-04-14  7:56   ` Jiri Slaby
2025-04-14 17:59     ` Praveen Talari [this message]
2025-04-10 17:40 ` [PATCH v1 5/9] serial: qcom-geni: move resource initialization to separate functions Praveen Talari
2025-04-14  7:58   ` Jiri Slaby
2025-04-10 17:40 ` [PATCH v1 6/9] serial: qcom-geni: move resource control logic " Praveen Talari
2025-04-14  7:59   ` Jiri Slaby
2025-04-14  8:55     ` Praveen Talari
2025-04-10 17:40 ` [PATCH v1 7/9] serial: qcom-geni: move clock-rate logic to separate function Praveen Talari
2025-04-11 19:12   ` kernel test robot
2025-04-14  8:01   ` Jiri Slaby
2025-04-10 17:40 ` [PATCH v1 8/9] serial: qcom-geni: Enable PM runtime for serial driver Praveen Talari
2025-04-10 17:40 ` [PATCH v1 9/9] serial: qcom-geni: Enable Serial on SA8255p Qualcomm platforms Praveen Talari
2025-04-14  8:09   ` Jiri Slaby
2025-04-14 17:49     ` Praveen Talari

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=1e69b6f5-efe7-4b81-8bea-b463b1eacfd4@quicinc.com \
    --to=quic_ptalari@quicinc.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=djaggi@quicinc.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=psodagud@quicinc.com \
    --cc=quic_arandive@quicinc.com \
    --cc=quic_mnaresh@quicinc.com \
    --cc=quic_msavaliy@quicinc.com \
    --cc=quic_shazhuss@quicinc.com \
    --cc=quic_vtanuku@quicinc.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=vireshk@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