* [PATCH][MIPS] set up Cobalt's mips_hpt_frequency
@ 2007-12-09 12:22 Yoichi Yuasa
2007-12-09 19:10 ` Ralf Baechle
2007-12-10 12:03 ` Sergei Shtylyov
0 siblings, 2 replies; 6+ messages in thread
From: Yoichi Yuasa @ 2007-12-09 12:22 UTC (permalink / raw)
To: Ralf Baechle; +Cc: yoichi_yuasa, linux-mips
Set up Cobalt's mips_hpt_frequency.
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/cobalt/time.c mips/arch/mips/cobalt/time.c
--- mips-orig/arch/mips/cobalt/time.c 2007-12-06 18:27:02.689043750 +0900
+++ mips/arch/mips/cobalt/time.c 2007-12-09 17:13:37.916769000 +0900
@@ -27,9 +27,28 @@
void __init plat_time_init(void)
{
+ u32 start, end;
+ int i = HZ / 10;
+
setup_pit_timer();
gt641xx_set_base_clock(GT641XX_BASE_CLOCK);
- mips_timer_state = gt641xx_timer0_state;
+ /*
+ * MIPS counter frequency is measured between 100msec
+ * using GT64111 timer0.
+ */
+ while (!gt641xx_timer0_state())
+ ;
+
+ start = read_c0_count();
+
+ while (i--)
+ while (!gt641xx_timer0_state())
+ ;
+
+ end = read_c0_count();
+
+ mips_hpt_frequency = (end - start) * 10;
+ printk(KERN_INFO "MIPS counter frequency %dHz\n", mips_hpt_frequency);
}
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH][MIPS] set up Cobalt's mips_hpt_frequency
2007-12-09 12:22 [PATCH][MIPS] set up Cobalt's mips_hpt_frequency Yoichi Yuasa
@ 2007-12-09 19:10 ` Ralf Baechle
2007-12-10 0:36 ` Yoichi Yuasa
2007-12-10 12:03 ` Sergei Shtylyov
1 sibling, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2007-12-09 19:10 UTC (permalink / raw)
To: Yoichi Yuasa; +Cc: linux-mips
On Sun, Dec 09, 2007 at 09:22:04PM +0900, Yoichi Yuasa wrote:
> Set up Cobalt's mips_hpt_frequency.
Queue for 2.6.25. Thanks,
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][MIPS] set up Cobalt's mips_hpt_frequency
2007-12-09 19:10 ` Ralf Baechle
@ 2007-12-10 0:36 ` Yoichi Yuasa
2007-12-10 13:15 ` Ralf Baechle
0 siblings, 1 reply; 6+ messages in thread
From: Yoichi Yuasa @ 2007-12-10 0:36 UTC (permalink / raw)
To: Ralf Baechle; +Cc: yoichi_yuasa, linux-mips
On Sun, 9 Dec 2007 19:10:39 +0000
Ralf Baechle <ralf@linux-mips.org> wrote:
> On Sun, Dec 09, 2007 at 09:22:04PM +0900, Yoichi Yuasa wrote:
>
> > Set up Cobalt's mips_hpt_frequency.
>
> Queue for 2.6.25. Thanks,
Cobalt cannot boot as this patch doesn't exist.
Please apply 2.6.24-rc too.
Thanks,
Yoichi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][MIPS] set up Cobalt's mips_hpt_frequency
2007-12-10 0:36 ` Yoichi Yuasa
@ 2007-12-10 13:15 ` Ralf Baechle
0 siblings, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2007-12-10 13:15 UTC (permalink / raw)
To: Yoichi Yuasa; +Cc: linux-mips
On Mon, Dec 10, 2007 at 09:36:27AM +0900, Yoichi Yuasa wrote:
> > On Sun, Dec 09, 2007 at 09:22:04PM +0900, Yoichi Yuasa wrote:
> >
> > > Set up Cobalt's mips_hpt_frequency.
> >
> > Queue for 2.6.25. Thanks,
>
> Cobalt cannot boot as this patch doesn't exist.
> Please apply 2.6.24-rc too.
Ah, sorry. Applied.
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][MIPS] set up Cobalt's mips_hpt_frequency
2007-12-09 12:22 [PATCH][MIPS] set up Cobalt's mips_hpt_frequency Yoichi Yuasa
2007-12-09 19:10 ` Ralf Baechle
@ 2007-12-10 12:03 ` Sergei Shtylyov
2007-12-10 13:22 ` Ralf Baechle
1 sibling, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2007-12-10 12:03 UTC (permalink / raw)
To: Yoichi Yuasa; +Cc: Ralf Baechle, linux-mips
Hello.
Yoichi Yuasa wrote:
> Set up Cobalt's mips_hpt_frequency.
> Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
> diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/cobalt/time.c mips/arch/mips/cobalt/time.c
> --- mips-orig/arch/mips/cobalt/time.c 2007-12-06 18:27:02.689043750 +0900
> +++ mips/arch/mips/cobalt/time.c 2007-12-09 17:13:37.916769000 +0900
> @@ -27,9 +27,28 @@
>
> void __init plat_time_init(void)
> {
> + u32 start, end;
> + int i = HZ / 10;
> +
> setup_pit_timer();
>
> gt641xx_set_base_clock(GT641XX_BASE_CLOCK);
>
> - mips_timer_state = gt641xx_timer0_state;
> + /*
> + * MIPS counter frequency is measured between 100msec
s/between/during/
WBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH][MIPS] set up Cobalt's mips_hpt_frequency
2007-12-10 12:03 ` Sergei Shtylyov
@ 2007-12-10 13:22 ` Ralf Baechle
0 siblings, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2007-12-10 13:22 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Yoichi Yuasa, linux-mips
On Mon, Dec 10, 2007 at 03:03:45PM +0300, Sergei Shtylyov wrote:
>> diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/cobalt/time.c mips/arch/mips/cobalt/time.c
>> --- mips-orig/arch/mips/cobalt/time.c 2007-12-06 18:27:02.689043750 +0900
>> +++ mips/arch/mips/cobalt/time.c 2007-12-09 17:13:37.916769000 +0900
>> @@ -27,9 +27,28 @@
>> void __init plat_time_init(void)
>> {
>> + u32 start, end;
>> + int i = HZ / 10;
>> +
>> setup_pit_timer();
>> gt641xx_set_base_clock(GT641XX_BASE_CLOCK);
>> - mips_timer_state = gt641xx_timer0_state;
>> + /*
>> + * MIPS counter frequency is measured between 100msec
>
> s/between/during/
Fixed. The patch which will go to Linus will have the typo fix comment
folded into the actual mips_hpt_frequency patch.
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-12-10 13:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-09 12:22 [PATCH][MIPS] set up Cobalt's mips_hpt_frequency Yoichi Yuasa
2007-12-09 19:10 ` Ralf Baechle
2007-12-10 0:36 ` Yoichi Yuasa
2007-12-10 13:15 ` Ralf Baechle
2007-12-10 12:03 ` Sergei Shtylyov
2007-12-10 13:22 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox