mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: CHANDRU DHAVAMANI <chandru@ti.com>
To: "Kumar, Udit" <u-kumar1@ti.com>,
	Kamlesh Gurudasani <kamlesh@ti.com>, Nishanth Menon <nm@ti.com>
Cc: <kristo@kernel.org>, <ssantosh@kernel.org>, <rishabh@ti.com>,
	<vigneshr@ti.com>, <mturquette@baylibre.com>, <sboyd@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-clk@vger.kernel.org>
Subject: Re: [PATCH v2] clk: keystone: sci-clk: Adding support for non contiguous clocks
Date: Wed, 7 Feb 2024 12:53:47 +0530	[thread overview]
Message-ID: <4398af20-3396-4a5c-8fcb-a7b3d0d6f15b@ti.com> (raw)
In-Reply-To: <e2ea03ce-0367-413b-aca9-7c1fabda173a@ti.com>


On 07/02/24 11:03, Kumar, Udit wrote:
>
> On 2/6/2024 9:24 PM, Kamlesh Gurudasani wrote:
>> "Kumar, Udit" <u-kumar1@ti.com> writes:
>>
>>>>>>> get_freq is a bit expensive as it has to walk the clock tree to 
>>>>>>> find
>>>>>>> the clock frequency (at least the first time?). just wondering if
>>>>>>> there is lighter alternative here?
>>>>>>>
>>>>>> How about get_clock? Doesn't read the registers at least.
>>>>> Said API needs, some flags to be passed,
>>>>>
>>>>> Can those flag be set to zero, Chandru ?
>>>>
>>>> get_clock doesn't require any flags to be passed.
>>>
>>> May be firmware does not need it but  I was referring to
>>>
>>> https://elixir.bootlin.com/linux/latest/source/drivers/clk/keystone/sci-clk.c#L78 
>>>
>> Just took a look,
>>
>> I now understand the reason for confusion,
>>
>> #define TI_SCI_MSG_SET_CLOCK_STATE    0x0100
>> #define TI_SCI_MSG_GET_CLOCK_STATE    0x0101
>>
>> cops->get_clock = ti_sci_cmd_get_clock;  --> refers to
>> TI_SCI_MSG_SET_CLOCK_STATE
>> That's why we are passing the flag from linux for get_clock
>>
>> Linux is using terminology of get/put.
>>
>> As Chandru pointed, we don't have to pass flags, cause he is refering
>> to TI_SCI_MSG_GET_CLOCK_STATE
>>
>> Below functions passes TI_SCI_MSG_GET_CLOCK_STATE to DM, which is what
>> we actually want.
>> cops->is_auto = ti_sci_cmd_clk_is_auto;
>> cops->is_on = ti_sci_cmd_clk_is_on;
>> cops->is_off = ti_sci_cmd_clk_is_off;
>
>
> I think calling ti_sci_cmd_clk_is_auto should be good . other 
> functions needs current state and requested state.
>
> Chandru ?
>

ti_sci_cmd_clk_is_auto is internal function to linux.
For TI_SCI_MSG_GET_CLOCK_STATE, linux only needs to pass pointers to the 
variables where result will be stored.


>>
>> Which should be safe to call, Chandru can confirm.
>>
>> Regards,
>> Kamlesh
>>>
>>>
>>>>
>>>>>
>>>>>> Regards,
>>>>>> Kamlesh

  reply	other threads:[~2024-02-07  7:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06 10:43 Udit Kumar
2024-02-06 13:14 ` Nishanth Menon
2024-02-06 13:54   ` Kamlesh Gurudasani
2024-02-06 14:15     ` Kumar, Udit
2024-02-06 14:26       ` CHANDRU DHAVAMANI
2024-02-06 14:39         ` Kumar, Udit
2024-02-06 15:54           ` Kamlesh Gurudasani
2024-02-07  5:33             ` Kumar, Udit
2024-02-07  7:23               ` CHANDRU DHAVAMANI [this message]
2024-02-07  7:33                 ` Kumar, Udit
2024-02-07  8:06                   ` CHANDRU DHAVAMANI
2024-02-06 14:14   ` Kumar, Udit
2024-02-06 14:21 ` Kamlesh Gurudasani

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=4398af20-3396-4a5c-8fcb-a7b3d0d6f15b@ti.com \
    --to=chandru@ti.com \
    --cc=kamlesh@ti.com \
    --cc=kristo@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=nm@ti.com \
    --cc=rishabh@ti.com \
    --cc=sboyd@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=u-kumar1@ti.com \
    --cc=vigneshr@ti.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

all inboxes | Powered by JetHome®