linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] cpufreq-pxa3xx: use HSIO 312MHz on the pxa310
@ 2010-07-08 17:04 pieterg
  2010-07-09  8:02 ` Eric Miao
  0 siblings, 1 reply; 8+ messages in thread
From: pieterg @ 2010-07-08 17:04 UTC (permalink / raw)
  To: linux-arm-kernel

An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100708/12fcc7a6/attachment.ksh>

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

* [PATCH 1/5] cpufreq-pxa3xx: use HSIO 312MHz on the pxa310
  2010-07-08 17:04 [PATCH 1/5] cpufreq-pxa3xx: use HSIO 312MHz on the pxa310 pieterg
@ 2010-07-09  8:02 ` Eric Miao
  2010-07-09  8:31   ` pieterg
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Miao @ 2010-07-09  8:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 9, 2010 at 1:04 AM, pieterg <pieterg@gmx.com> wrote:
>
> Signed-off-by: pieter <p.grimmerink@inepro.com>
> ---
> ?arch/arm/mach-pxa/cpufreq-pxa3xx.c | ? 13 ++++++++++++-
> ?1 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/cpufreq-pxa3xx.c
> b/arch/arm/mach-pxa/cpufreq-pxa3xx.c
> index 27fa329..8cc10c3 100644
> --- a/arch/arm/mach-pxa/cpufreq-pxa3xx.c
> +++ b/arch/arm/mach-pxa/cpufreq-pxa3xx.c
> @@ -76,6 +76,14 @@ static struct pxa3xx_freq_info pxa300_freqs[] = {
> ? ? ? ?OP(624, 24, 2, 208, 260, 208, 312, 3, 1375, 1400), /* 624MHz */
> ?};
>
> +static struct pxa3xx_freq_info pxa310_freqs[] = {
> + ? ? ? /* ?CPU XL XN ?HSS DMEM SMEM SRAM DFI VCC_CORE VCC_SRAM */
> + ? ? ? OP(104, ?8, 1, 104, 260, ?78, 104, 3, 1000, 1100), /* 104MHz */
> + ? ? ? OP(208, 16, 1, 104, 260, 104, 156, 2, 1000, 1100), /* 208MHz */
> + ? ? ? OP(416, 16, 2, 156, 260, 104, 208, 2, 1100, 1200), /* 416MHz */
> + ? ? ? OP(624, 24, 2, 312, 260, 208, 312, 3, 1375, 1400), /* 624MHz */

What's wrong with 208MHz HSS on PXA310?

> +};
> +
> ?static struct pxa3xx_freq_info pxa320_freqs[] = {
> ? ? ? ?/* ?CPU XL XN ?HSS DMEM SMEM SRAM DFI VCC_CORE VCC_SRAM */
> ? ? ? ?OP(104, ?8, 1, 104, 260, ?78, 104, 3, 1000, 1100), /* 104MHz */
> @@ -214,9 +222,12 @@ static __init int pxa3xx_cpufreq_init(struct
> cpufreq_policy *policy)
> ? ? ? ?policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
> ? ? ? ?policy->cur = policy->min = policy->max = get_clk_frequency_khz(0);
>
> - ? ? ? if (cpu_is_pxa300() || cpu_is_pxa310())
> + ? ? ? if (cpu_is_pxa300())
> ? ? ? ? ? ? ? ?ret = setup_freqs_table(policy, ARRAY_AND_SIZE(pxa300_freqs));
>
> + ? ? ? if (cpu_is_pxa310())
> + ? ? ? ? ? ? ? ret = setup_freqs_table(policy, ARRAY_AND_SIZE(pxa310_freqs));
> +
> ? ? ? ?if (cpu_is_pxa320())
> ? ? ? ? ? ? ? ?ret = setup_freqs_table(policy, ARRAY_AND_SIZE(pxa320_freqs));
>
> --
> 1.6.5.rc1.44.ga1675
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

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

* [PATCH 1/5] cpufreq-pxa3xx: use HSIO 312MHz on the pxa310
  2010-07-09  8:02 ` Eric Miao
@ 2010-07-09  8:31   ` pieterg
  2010-07-11  7:14     ` Igor Grinberg
  0 siblings, 1 reply; 8+ messages in thread
From: pieterg @ 2010-07-09  8:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 09 July 2010 10:02:16 Eric Miao wrote:
> What's wrong with 208MHz HSS on PXA310?

I haven't done any benchmarking, but Marvell found it worth to introduce 
312MHz for the pxa310. (I assume it might have something to do with the 
video accelerator, which is unique to the pxa310).

And to me it makes sense to use the highest supported speeds in the top 
cpufreq entry.

Rgds, Pieter

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

* [PATCH 1/5] cpufreq-pxa3xx: use HSIO 312MHz on the pxa310
  2010-07-09  8:31   ` pieterg
@ 2010-07-11  7:14     ` Igor Grinberg
  2010-07-12  8:37       ` pieterg
  0 siblings, 1 reply; 8+ messages in thread
From: Igor Grinberg @ 2010-07-11  7:14 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/09/10 11:31, pieterg wrote:
> On Friday 09 July 2010 10:02:16 Eric Miao wrote:
>   
>> What's wrong with 208MHz HSS on PXA310?
>>     
> I haven't done any benchmarking, but Marvell found it worth to introduce 
> 312MHz for the pxa310. (I assume it might have something to do with the 
> video accelerator, which is unique to the pxa310).
>
> And to me it makes sense to use the highest supported speeds in the top 
> cpufreq entry.
>
>   

According to Marvell's PXA3xx Specification Update document
(page 68 - SCr#3), the above is correct starting from silicon revision A2.
What about earlier revisions? Shouldn't we support all of them?

> Rgds, Pieter
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
>   

-- 
Regards,
Igor.

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

* [PATCH 1/5] cpufreq-pxa3xx: use HSIO 312MHz on the pxa310
  2010-07-11  7:14     ` Igor Grinberg
@ 2010-07-12  8:37       ` pieterg
  2010-07-12  9:13         ` Igor Grinberg
  0 siblings, 1 reply; 8+ messages in thread
From: pieterg @ 2010-07-12  8:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Sunday 11 July 2010 09:14:22 Igor Grinberg wrote:
> On 07/09/10 11:31, pieterg wrote:
> > On Friday 09 July 2010 10:02:16 Eric Miao wrote:
> >> What's wrong with 208MHz HSS on PXA310?
> >
> > I haven't done any benchmarking, but Marvell found it worth to
> > introduce 312MHz for the pxa310. (I assume it might have something to
> > do with the video accelerator, which is unique to the pxa310).
> >
> > And to me it makes sense to use the highest supported speeds in the top
> > cpufreq entry.
>
> According to Marvell's PXA3xx Specification Update document
> (page 68 - SCr#3), the above is correct starting from silicon revision
> A2. What about earlier revisions? Shouldn't we support all of them?

OK, I missed that. In that case we should leave this one out.

Rgds, Pieter

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

* [PATCH 1/5] cpufreq-pxa3xx: use HSIO 312MHz on the pxa310
  2010-07-12  8:37       ` pieterg
@ 2010-07-12  9:13         ` Igor Grinberg
  2010-07-12  9:29           ` Eric Miao
  0 siblings, 1 reply; 8+ messages in thread
From: Igor Grinberg @ 2010-07-12  9:13 UTC (permalink / raw)
  To: linux-arm-kernel



On 07/12/10 11:37, pieterg wrote:
> On Sunday 11 July 2010 09:14:22 Igor Grinberg wrote:
>   
>> On 07/09/10 11:31, pieterg wrote:
>>     
>>> On Friday 09 July 2010 10:02:16 Eric Miao wrote:
>>>       
>>>> What's wrong with 208MHz HSS on PXA310?
>>>>         
>>> I haven't done any benchmarking, but Marvell found it worth to
>>> introduce 312MHz for the pxa310. (I assume it might have something to
>>> do with the video accelerator, which is unique to the pxa310).
>>>
>>> And to me it makes sense to use the highest supported speeds in the top
>>> cpufreq entry.
>>>       
>> According to Marvell's PXA3xx Specification Update document
>> (page 68 - SCr#3), the above is correct starting from silicon revision
>> A2. What about earlier revisions? Shouldn't we support all of them?
>>     
> OK, I missed that. In that case we should leave this one out.
>   

If you really want this to go, you can check the cpu stepping (cpuid
register)
and fixup the table accordingly. Something like:

if (cpu_is_pxa310())
        ret = setup_freqs_table(policy, (read_cpuid_id() & 0xf) ?
                                                       
ARRAY_AND_SIZE(pxa310_freqs) :
                                                       
ARRAY_AND_SIZE(pxa300_freqs));

but I don't know if Eric will like it ;)

> Rgds, Pieter
>
>   

-- 
Regards,
Igor.

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

* [PATCH 1/5] cpufreq-pxa3xx: use HSIO 312MHz on the pxa310
  2010-07-12  9:13         ` Igor Grinberg
@ 2010-07-12  9:29           ` Eric Miao
  2010-07-12 10:20             ` Igor Grinberg
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Miao @ 2010-07-12  9:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 12, 2010 at 5:13 PM, Igor Grinberg <grinberg@compulab.co.il> wrote:
>
>
> On 07/12/10 11:37, pieterg wrote:
>> On Sunday 11 July 2010 09:14:22 Igor Grinberg wrote:
>>
>>> On 07/09/10 11:31, pieterg wrote:
>>>
>>>> On Friday 09 July 2010 10:02:16 Eric Miao wrote:
>>>>
>>>>> What's wrong with 208MHz HSS on PXA310?
>>>>>
>>>> I haven't done any benchmarking, but Marvell found it worth to
>>>> introduce 312MHz for the pxa310. (I assume it might have something to
>>>> do with the video accelerator, which is unique to the pxa310).
>>>>
>>>> And to me it makes sense to use the highest supported speeds in the top
>>>> cpufreq entry.
>>>>
>>> According to Marvell's PXA3xx Specification Update document
>>> (page 68 - SCr#3), the above is correct starting from silicon revision
>>> A2. What about earlier revisions? Shouldn't we support all of them?
>>>
>> OK, I missed that. In that case we should leave this one out.
>>
>
> If you really want this to go, you can check the cpu stepping (cpuid
> register)
> and fixup the table accordingly. Something like:
>
> if (cpu_is_pxa310())
> ? ? ? ?ret = setup_freqs_table(policy, (read_cpuid_id() & 0xf) ?
>
> ARRAY_AND_SIZE(pxa310_freqs) :
>
> ARRAY_AND_SIZE(pxa300_freqs));
>
> but I don't know if Eric will like it ;)
>

Nah, I was thinking of introducing a cpu_is_pxa310_a2() or something,
but that's really hard to make generic, since for this case, we'd
have to use cpu_is_pxa310_a2_or_above(), which is #!$!%!@#$

So to put it simple, I think a command line parameter would make
more sense in this case. e.g. pxa310_use_312mhz.

>> Rgds, Pieter
>>
>>
>
> --
> Regards,
> Igor.
>
>

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

* [PATCH 1/5] cpufreq-pxa3xx: use HSIO 312MHz on the pxa310
  2010-07-12  9:29           ` Eric Miao
@ 2010-07-12 10:20             ` Igor Grinberg
  0 siblings, 0 replies; 8+ messages in thread
From: Igor Grinberg @ 2010-07-12 10:20 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/12/10 12:29, Eric Miao wrote:
> On Mon, Jul 12, 2010 at 5:13 PM, Igor Grinberg <grinberg@compulab.co.il> wrote:
>   
>>
>> On 07/12/10 11:37, pieterg wrote:
>>     
>>> On Sunday 11 July 2010 09:14:22 Igor Grinberg wrote:
>>>
>>>       
>>>> On 07/09/10 11:31, pieterg wrote:
>>>>
>>>>         
>>>>> On Friday 09 July 2010 10:02:16 Eric Miao wrote:
>>>>>
>>>>>           
>>>>>> What's wrong with 208MHz HSS on PXA310?
>>>>>>
>>>>>>             
>>>>> I haven't done any benchmarking, but Marvell found it worth to
>>>>> introduce 312MHz for the pxa310. (I assume it might have something to
>>>>> do with the video accelerator, which is unique to the pxa310).
>>>>>
>>>>> And to me it makes sense to use the highest supported speeds in the top
>>>>> cpufreq entry.
>>>>>
>>>>>           
>>>> According to Marvell's PXA3xx Specification Update document
>>>> (page 68 - SCr#3), the above is correct starting from silicon revision
>>>> A2. What about earlier revisions? Shouldn't we support all of them?
>>>>
>>>>         
>>> OK, I missed that. In that case we should leave this one out.
>>>
>>>       
>> If you really want this to go, you can check the cpu stepping (cpuid
>> register)
>> and fixup the table accordingly. Something like:
>>
>> if (cpu_is_pxa310())
>>        ret = setup_freqs_table(policy, (read_cpuid_id() & 0xf) ?
>>
>> ARRAY_AND_SIZE(pxa310_freqs) :
>>
>> ARRAY_AND_SIZE(pxa300_freqs));
>>
>> but I don't know if Eric will like it ;)
>>
>>     
> Nah, I was thinking of introducing a cpu_is_pxa310_a2() or something,
> but that's really hard to make generic, since for this case, we'd
> have to use cpu_is_pxa310_a2_or_above(), which is #!$!%!@#$
>
> So to put it simple, I think a command line parameter would make
> more sense in this case. e.g. pxa310_use_312mhz.
>   

Indeed, command line parameter pxa310.hss=312/208 sounds good

>   
>>> Rgds, Pieter
>>>
>>>
>>>       
>> --
>> Regards,
>> Igor.
>>
>>
>>     
>   

-- 
Regards,
Igor.

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

end of thread, other threads:[~2010-07-12 10:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-08 17:04 [PATCH 1/5] cpufreq-pxa3xx: use HSIO 312MHz on the pxa310 pieterg
2010-07-09  8:02 ` Eric Miao
2010-07-09  8:31   ` pieterg
2010-07-11  7:14     ` Igor Grinberg
2010-07-12  8:37       ` pieterg
2010-07-12  9:13         ` Igor Grinberg
2010-07-12  9:29           ` Eric Miao
2010-07-12 10:20             ` Igor Grinberg

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).