Skip to contentSkip to conversation

TX4927 processor can support different speeds

PATCH In review Manish Lachwani 4 participants 8 messages Jan 23, 2005 – Jan 24, 2005 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 TX4927 processor can support different speeds

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

Source: MontaVista Software, Inc. | http://www.mvista.com | Manish Lachwani <[email protected]>
MR: 9936
Type: Enhancement
Disposition: Submitted to linux-mips.org
Keywords:

Description:
Based on suggestion from Toshiba, TX4927 can operate at different speeds

arch/mips/Kconfig +8 -0
Index: 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
arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c +5 -1
Index: 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");
#1 lore raw
Quoted 5 lines · Manish Lachwani

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

#2 lore raw
Quoted 5 lines · Thiemo Seufer
Quoted 3 lines

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

#3 lore raw
Quoted 11 lines · Ralf Baechle
Quoted 6 lines · Thiemo Seufer
Quoted 3 lines

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?

Quoted 9 lines

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

#4 lore raw
Quoted 1 line · Manish Lachwani

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

#5 lore raw
Quoted 4 lines · Ralf Baechle

On Sun, Jan 23, 2005 at 12:39:42PM -0800, Manish Lachwani wrote:

Quoted 11 lines
Quoted 3 lines

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

#6 lore raw
Quoted 1 line · Manish Lachwani
Quoted 1 line
Quoted 1 line

Why is this approach (in the patch) bad?

[...]

Quoted 2 lines
Quoted 2 lines

It's fragile because clock frequencies are changing faster in today's world of electronics than the weather in April.

[...]

Quoted 1 line

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

#7 lore raw
Quoted 17 lines · Maciej W. Rozycki
Quoted 3 lines · Manish Lachwani
Quoted 3 lines
Quoted 3 lines

Why is this approach (in the patch) bad?

[...]

Quoted 4 lines
Quoted 4 lines

It's fragile because clock frequencies are changing faster in today's world of electronics than the weather in April.

[...]

Quoted 10 lines
Quoted 3 lines

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