* [PATCH] TX4927 processor can support different speeds
@ 2005-01-23 19:23 Manish Lachwani
2005-01-23 19:41 ` Thiemo Seufer
0 siblings, 1 reply; 10+ messages in thread
From: Manish Lachwani @ 2005-01-23 19:23 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
[-- Attachment #1: Type: text/plain, Size: 224 bytes --]
Hi Ralf,
Based on the feedback from Toshiba, the TX4927 processor can support different
speeds. Attached patch takes care of that. If you find this approach reasonable,
can you please check it in
Thanks
Manish Lachwani
[-- Attachment #2: common_mips_tx4927_cpuspeed.patch --]
[-- Type: text/plain, Size: 1639 bytes --]
Source: MontaVista Software, Inc. | http://www.mvista.com | Manish Lachwani <mlachwani@mvista.com>
MR: 9936
Type: Enhancement
Disposition: Submitted to linux-mips.org
Keywords:
Signed-off-by: Manish Lachwani <mlachwani@mvista.com>
Description:
Based on suggestion from Toshiba, TX4927 can operate at different
speeds
Index: linux-2.6.10/arch/mips/Kconfig
===================================================================
--- linux-2.6.10.orig/arch/mips/Kconfig
+++ linux-2.6.10/arch/mips/Kconfig
@@ -901,6 +901,14 @@
This Toshiba board is based on the TX4927 processor. Say Y here to
support this machine type
+config TOSHIBA_TX4927_CPU_SPEED
+ int "CPU speed of the TX4927 processor (MHz)"
+ depends on TOSHIBA_RBTX4927
+ default 200
+ help
+ This sets the speed for the TX4927 processor. The default speed
+ is 200 MHz.
+
config TOSHIBA_FPCIB0
bool "FPCIB0 Backplane Support"
depends on TOSHIBA_RBTX4927
Index: linux-2.6.10/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
===================================================================
--- linux-2.6.10.orig/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
+++ linux-2.6.10/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
@@ -1008,7 +1008,11 @@
mips_hpt_frequency,
mips_hpt_frequency / 1000000);
#else
- mips_hpt_frequency = 100000000;
+ /*
+ * Default TX4927 processor speed is 200 MHz. However, it
+ * can be configured by the user
+ */
+ mips_hpt_frequency = (CONFIG_TOSHIBA_TX4927_CPU_SPEED * 1000000) / 2;
#endif
TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_TIME_INIT, "+\n");
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] TX4927 processor can support different speeds
2005-01-23 19:23 [PATCH] TX4927 processor can support different speeds Manish Lachwani
@ 2005-01-23 19:41 ` Thiemo Seufer
2005-01-23 19:51 ` Ralf Baechle
0 siblings, 1 reply; 10+ messages in thread
From: Thiemo Seufer @ 2005-01-23 19:41 UTC (permalink / raw)
To: Manish Lachwani; +Cc: linux-mips, ralf
Manish Lachwani wrote:
> Hi Ralf,
>
> Based on the feedback from Toshiba, the TX4927 processor can support different
> speeds. Attached patch takes care of that. If you find this approach reasonable,
> can you please check it in
Shoudn't this better be tunable via /proc?
Thiemo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] TX4927 processor can support different speeds
2005-01-23 19:41 ` Thiemo Seufer
@ 2005-01-23 19:51 ` Ralf Baechle
2005-01-23 20:39 ` Manish Lachwani
0 siblings, 1 reply; 10+ messages in thread
From: Ralf Baechle @ 2005-01-23 19:51 UTC (permalink / raw)
To: Thiemo Seufer; +Cc: Manish Lachwani, linux-mips
On Sun, Jan 23, 2005 at 08:41:40PM +0100, Thiemo Seufer wrote:
> > Based on the feedback from Toshiba, the TX4927 processor can support different
> > speeds. Attached patch takes care of that. If you find this approach reasonable,
> > can you please check it in
>
> Shoudn't this better be tunable via /proc?
By the time that interface becomes available interrupt timers would
already have been missprogrammed. Try to calibrate the CPU timer against
some external timer such as the RTC instead. It's already being done
on the Indy.
Ralf
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] TX4927 processor can support different speeds
2005-01-23 19:51 ` Ralf Baechle
@ 2005-01-23 20:39 ` Manish Lachwani
2005-01-24 20:22 ` Ralf Baechle
0 siblings, 1 reply; 10+ messages in thread
From: Manish Lachwani @ 2005-01-23 20:39 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Thiemo Seufer, linux-mips
Ralf Baechle wrote:
>On Sun, Jan 23, 2005 at 08:41:40PM +0100, Thiemo Seufer wrote:
>
>
>
>>>Based on the feedback from Toshiba, the TX4927 processor can support different
>>>speeds. Attached patch takes care of that. If you find this approach reasonable,
>>>can you please check it in
>>>
>>>
>>Shoudn't this better be tunable via /proc?
>>
>>
>
>By the time that interface becomes available interrupt timers would
>already have been missprogrammed. Try to calibrate the CPU timer against
>some external timer such as the RTC instead. It's already being done
>on the Indy.
>
> Ralf
>
>
>
Hi Ralf,
Why is this approach (in the patch) bad?
Thanks
Manish Lachwani
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] TX4927 processor can support different speeds
2005-01-23 20:39 ` Manish Lachwani
@ 2005-01-24 20:22 ` Ralf Baechle
2005-01-24 20:48 ` Manish Lachwani
0 siblings, 1 reply; 10+ messages in thread
From: Ralf Baechle @ 2005-01-24 20:22 UTC (permalink / raw)
To: Manish Lachwani; +Cc: Thiemo Seufer, linux-mips
On Sun, Jan 23, 2005 at 12:39:42PM -0800, Manish Lachwani wrote:
> Why is this approach (in the patch) bad?
It's fragile because clock frequencies are changing faster in today's
world of electronics than the weather in April.
Ralf
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] TX4927 processor can support different speeds
2005-01-24 20:22 ` Ralf Baechle
@ 2005-01-24 20:48 ` Manish Lachwani
2005-01-24 21:13 ` Maciej W. Rozycki
0 siblings, 1 reply; 10+ messages in thread
From: Manish Lachwani @ 2005-01-24 20:48 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Thiemo Seufer, linux-mips
Ralf Baechle wrote:
>On Sun, Jan 23, 2005 at 12:39:42PM -0800, Manish Lachwani wrote:
>
>
>
>>Why is this approach (in the patch) bad?
>>
>>
>
>It's fragile because clock frequencies are changing faster in today's
>world of electronics than the weather in April.
>
> Ralf
>
>
>
So? Can you be a little more clear?
Thanks
Manish Lachwani
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] TX4927 processor can support different speeds
2005-01-24 20:48 ` Manish Lachwani
@ 2005-01-24 21:13 ` Maciej W. Rozycki
2005-01-24 21:28 ` Manish Lachwani
0 siblings, 1 reply; 10+ messages in thread
From: Maciej W. Rozycki @ 2005-01-24 21:13 UTC (permalink / raw)
To: Manish Lachwani; +Cc: Ralf Baechle, Thiemo Seufer, linux-mips
On Mon, 24 Jan 2005, Manish Lachwani wrote:
> > > Why is this approach (in the patch) bad?
[...]
> > It's fragile because clock frequencies are changing faster in today's
> > world of electronics than the weather in April.
[...]
> So? Can you be a little more clear?
Oh well, how can you assure a given binary will be booted on a CPU driven
by the right frequency? Is the clock source inside the chip containing
the CPU at least?
Maciej
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] TX4927 processor can support different speeds
2005-01-24 21:13 ` Maciej W. Rozycki
@ 2005-01-24 21:28 ` Manish Lachwani
0 siblings, 0 replies; 10+ messages in thread
From: Manish Lachwani @ 2005-01-24 21:28 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Ralf Baechle, Thiemo Seufer, linux-mips
Maciej W. Rozycki wrote:
>On Mon, 24 Jan 2005, Manish Lachwani wrote:
>
>
>
>>>>Why is this approach (in the patch) bad?
>>>>
>>>>
>[...]
>
>
>>>It's fragile because clock frequencies are changing faster in today's
>>>world of electronics than the weather in April.
>>>
>>>
>[...]
>
>
>>So? Can you be a little more clear?
>>
>>
>
> Oh well, how can you assure a given binary will be booted on a CPU driven
>by the right frequency? Is the clock source inside the chip containing
>the CPU at least?
>
> Maciej
>
>
>
Ok, that make things clear. Thanks Maciej,
Manish Lachwani
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] TX4927 processor can support different speeds
@ 2005-01-24 21:23 Brad Larson
2005-01-25 0:37 ` Maciej W. Rozycki
0 siblings, 1 reply; 10+ messages in thread
From: Brad Larson @ 2005-01-24 21:23 UTC (permalink / raw)
To: 'Maciej W. Rozycki', Manish Lachwani
Cc: Ralf Baechle, Thiemo Seufer, linux-mips
> On Mon, 24 Jan 2005, Manish Lachwani wrote:
>
> > > > Why is this approach (in the patch) bad?
> [...]
> > > It's fragile because clock frequencies are changing
> faster in today's
> > > world of electronics than the weather in April.
> [...]
> > So? Can you be a little more clear?
>
> Oh well, how can you assure a given binary will be booted on
> a CPU driven
> by the right frequency? Is the clock source inside the chip
> containing
> the CPU at least?
>
> Maciej
I've seen more boards with slightly, sometimes dramatically, modified cpu clock source for performance and production reliability reasons than not having an external RTC. External RTC present and one kernel can accurately enough report the cpu frequency for Toshiba "stock" values and others as well.
--Brad
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] TX4927 processor can support different speeds
2005-01-24 21:23 Brad Larson
@ 2005-01-25 0:37 ` Maciej W. Rozycki
0 siblings, 0 replies; 10+ messages in thread
From: Maciej W. Rozycki @ 2005-01-25 0:37 UTC (permalink / raw)
To: Brad Larson; +Cc: Manish Lachwani, Ralf Baechle, Thiemo Seufer, linux-mips
On Mon, 24 Jan 2005, Brad Larson wrote:
> I've seen more boards with slightly, sometimes dramatically, modified
> cpu clock source for performance and production reliability reasons than
> not having an external RTC. External RTC present and one kernel can
> accurately enough report the cpu frequency for Toshiba "stock" values
> and others as well.
And you don't need a full-blown RTC even -- any reasonably accessible
reference clock with a known frequency will do.
Maciej
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-01-25 0:37 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-23 19:23 [PATCH] TX4927 processor can support different speeds Manish Lachwani
2005-01-23 19:41 ` Thiemo Seufer
2005-01-23 19:51 ` Ralf Baechle
2005-01-23 20:39 ` Manish Lachwani
2005-01-24 20:22 ` Ralf Baechle
2005-01-24 20:48 ` Manish Lachwani
2005-01-24 21:13 ` Maciej W. Rozycki
2005-01-24 21:28 ` Manish Lachwani
-- strict thread matches above, loose matches on Subject: below --
2005-01-24 21:23 Brad Larson
2005-01-25 0:37 ` Maciej W. Rozycki
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.