All of lore.kernel.org
 help / color / mirror / Atom feed
* cpufreq: get cpufreq_frequency_table from clk driver
@ 2017-02-21 11:13 ` Vlad Zakharov
  0 siblings, 0 replies; 7+ messages in thread
From: Vlad Zakharov @ 2017-02-21 11:13 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-kernel, viresh.kumar, mturquette, sboyd, rjw, linux-clk,
	linux-snps-arc

Hello,

I am trying to implement a cpufreq driver for ARCHS cpu.

And I faced with one question I am not able to answer myself. cpufreq framework allows us using cpufreq frequency tables
that store available for current policy range of frequencies with any additional data. As I understand for example it
can be clock configurations for this particular frequency.

Also I have a clk driver that manages actual cpu frequency. In fact it uses very similar tables that contain frequencies
and corresponding values of clock configurations registers that are to be set up with current frequency.

So the question is can I get such tables from clk driver somehow? I would be very convenient: this tables differs for
ARCHS CPU. E.g. on different boards it is clocked by different PLLs and oscillators.

Do you know any way to get the tables from clk driver? Any suggestions or comments might be very helpful.

Thanks!

-- 
Best regards,
Vlad Zakharov <vzakhar@synopsys.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* cpufreq: get cpufreq_frequency_table from clk driver
@ 2017-02-21 11:13 ` Vlad Zakharov
  0 siblings, 0 replies; 7+ messages in thread
From: Vlad Zakharov @ 2017-02-21 11:13 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-kernel, viresh.kumar, mturquette, sboyd, rjw, linux-clk,
	linux-snps-arc

SGVsbG8sDQoNCkkgYW0gdHJ5aW5nIHRvIGltcGxlbWVudCBhIGNwdWZyZXEgZHJpdmVyIGZvciBB
UkNIUyBjcHUuDQoNCkFuZCBJIGZhY2VkIHdpdGggb25lIHF1ZXN0aW9uIEkgYW0gbm90IGFibGUg
dG8gYW5zd2VyIG15c2VsZi4gY3B1ZnJlcSBmcmFtZXdvcmsgYWxsb3dzIHVzIHVzaW5nIGNwdWZy
ZXEgZnJlcXVlbmN5IHRhYmxlcw0KdGhhdCBzdG9yZSBhdmFpbGFibGUgZm9yIGN1cnJlbnQgcG9s
aWN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ufreq: get cpufreq_frequency_table from clk driver
@ 2017-02-21 11:13 ` Vlad Zakharov
  0 siblings, 0 replies; 7+ messages in thread
From: Vlad Zakharov @ 2017-02-21 11:13 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-kernel, viresh.kumar, mturquette, sboyd, rjw, linux-clk,
	linux-snps-arc

Hello,

I am trying to implement a cpufreq driver for ARCHS cpu.

And I faced with one question I am not able to answer myself. cpufreq framework allows us using cpufreq frequency tables
that store available for current policy range of frequencies with any additional data. As I understand for example it
can be clock configurations for this particular frequency.

Also I have a clk driver that manages actual cpu frequency. In fact it uses very similar tables that contain frequencies
and corresponding values of clock configurations registers that are to be set up with current frequency.

So the question is can I get such tables from clk driver somehow? I would be very convenient: this tables differs for
ARCHS CPU. E.g. on different boards it is clocked by different PLLs and oscillators.

Do you know any way to get the tables from clk driver? Any suggestions or comments might be very helpful.

Thanks!

-- 
Best regards,
Vlad Zakharov <vzakhar@synopsys.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* cpufreq: get cpufreq_frequency_table from clk driver
@ 2017-02-21 11:13 ` Vlad Zakharov
  0 siblings, 0 replies; 7+ messages in thread
From: Vlad Zakharov @ 2017-02-21 11:13 UTC (permalink / raw)
  To: linux-snps-arc

Hello,

I am trying to implement a cpufreq driver for ARCHS cpu.

And I faced with one question I am not able to answer myself. cpufreq framework allows us using cpufreq frequency tables
that store available for current policy range of frequencies with any additional data. As I understand for example it
can be clock configurations for this particular frequency.

Also I have a clk driver that manages actual cpu frequency. In fact it uses very similar tables that contain frequencies
and corresponding values of clock configurations registers that are to be set up with current frequency.

So the question is can I get such tables from clk driver somehow? I would be very convenient: this tables differs for
ARCHS CPU. E.g. on different boards it is clocked by different PLLs and oscillators.

Do you know any way to get the tables from clk driver? Any suggestions or comments might be very helpful.

Thanks!

-- 
Best regards,
Vlad Zakharov <vzakhar at synopsys.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cpufreq: get cpufreq_frequency_table from clk driver
  2017-02-21 11:13 ` Vlad Zakharov
  (?)
@ 2017-02-23  4:54   ` Viresh Kumar
  -1 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2017-02-23  4:54 UTC (permalink / raw)
  To: Vlad Zakharov
  Cc: linux-pm, linux-kernel, mturquette, sboyd, rjw, linux-clk,
	linux-snps-arc

On 21-02-17, 11:13, Vlad Zakharov wrote:
> Hello,
> 
> I am trying to implement a cpufreq driver for ARCHS cpu.

You mean ARC architecture here ?

> And I faced with one question I am not able to answer myself. cpufreq framework allows us using cpufreq frequency tables
> that store available for current policy range of frequencies with any additional data. As I understand for example it
> can be clock configurations for this particular frequency.

Yes, it can be any platform specific data. Yes, but it is better
handled by the clk driver in your case and cpufreq driver just needs
to call clk_set_rate().

> Also I have a clk driver that manages actual cpu frequency. In fact it uses very similar tables that contain frequencies
> and corresponding values of clock configurations registers that are to be set up with current frequency.

Good.

> So the question is can I get such tables from clk driver somehow? I would be very convenient: this tables differs for
> ARCHS CPU. E.g. on different boards it is clocked by different PLLs and oscillators.

Not that I am aware of. Just make copies for every board or if you can
use device tree, get it using OPP tables.

-- 
viresh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cpufreq: get cpufreq_frequency_table from clk driver
@ 2017-02-23  4:54   ` Viresh Kumar
  0 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2017-02-23  4:54 UTC (permalink / raw)
  To: Vlad Zakharov
  Cc: linux-pm, linux-kernel, mturquette, sboyd, rjw, linux-clk,
	linux-snps-arc

On 21-02-17, 11:13, Vlad Zakharov wrote:
> Hello,
> 
> I am trying to implement a cpufreq driver for ARCHS cpu.

You mean ARC architecture here ?

> And I faced with one question I am not able to answer myself. cpufreq framework allows us using cpufreq frequency tables
> that store available for current policy range of frequencies with any additional data. As I understand for example it
> can be clock configurations for this particular frequency.

Yes, it can be any platform specific data. Yes, but it is better
handled by the clk driver in your case and cpufreq driver just needs
to call clk_set_rate().

> Also I have a clk driver that manages actual cpu frequency. In fact it uses very similar tables that contain frequencies
> and corresponding values of clock configurations registers that are to be set up with current frequency.

Good.

> So the question is can I get such tables from clk driver somehow? I would be very convenient: this tables differs for
> ARCHS CPU. E.g. on different boards it is clocked by different PLLs and oscillators.

Not that I am aware of. Just make copies for every board or if you can
use device tree, get it using OPP tables.

-- 
viresh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* cpufreq: get cpufreq_frequency_table from clk driver
@ 2017-02-23  4:54   ` Viresh Kumar
  0 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2017-02-23  4:54 UTC (permalink / raw)
  To: linux-snps-arc

On 21-02-17, 11:13, Vlad Zakharov wrote:
> Hello,
> 
> I am trying to implement a cpufreq driver for ARCHS cpu.

You mean ARC architecture here ?

> And I faced with one question I am not able to answer myself. cpufreq framework allows us using cpufreq frequency tables
> that store available for current policy range of frequencies with any additional data. As I understand for example it
> can be clock configurations for this particular frequency.

Yes, it can be any platform specific data. Yes, but it is better
handled by the clk driver in your case and cpufreq driver just needs
to call clk_set_rate().

> Also I have a clk driver that manages actual cpu frequency. In fact it uses very similar tables that contain frequencies
> and corresponding values of clock configurations registers that are to be set up with current frequency.

Good.

> So the question is can I get such tables from clk driver somehow? I would be very convenient: this tables differs for
> ARCHS CPU. E.g. on different boards it is clocked by different PLLs and oscillators.

Not that I am aware of. Just make copies for every board or if you can
use device tree, get it using OPP tables.

-- 
viresh

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-23  4:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-21 11:13 cpufreq: get cpufreq_frequency_table from clk driver Vlad Zakharov
2017-02-21 11:13 ` Vlad Zakharov
2017-02-21 11:13 ` Vlad Zakharov
2017-02-21 11:13 ` Vlad Zakharov
2017-02-23  4:54 ` Viresh Kumar
2017-02-23  4:54   ` Viresh Kumar
2017-02-23  4:54   ` Viresh Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.