Skip to contentSkip to conversation

PPC440 interval timer off by factor of 10?

U-Boot-Users Andrew Wozniak 2 participants 3 messages Jan 4, 2005

lore
Share & tools
lore
#0 lore raw

Hello,

I'm porting the OCOTEA u-boot package to a customer PPC440 board. In the process of debugging (non-CFI) Flash timeout functions, it appears that get_timer() is returning a value which increments every 10msec instead of 1 msec:

Further code examinations shows that interrupt_init_cpu() is indeed setting up a 10msec interval.

#if defined(CONFIG_440)
	val = mfspr( tcr );
	...
	val = gd->bd->bi_intfreq/100;	/* 10 msec */
         ...

Is this a real BUG? I can fix the flash related function which use the timer but what about all the other modules which use get_timer() - some are network related.

Thank you.

#1 lore raw
Quoted 5 lines · In message <[email protected]> you wrote:

I'm porting the OCOTEA u-boot package to a customer PPC440 board. In the process of debugging (non-CFI) Flash timeout functions, it appears that get_timer() is returning a value which increments every 10msec instead of 1 msec:

...

Quoted 1 line

Is this a real BUG? I can fix the flash related function which use the

Looks like a bug to me.

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Make it right before you make it faster.
#2 lore raw

Ok, I will investigate if the fix has any bad side affects.

If no problems show up, I'll post a patch.

-Andy

Quoted 19 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:

I'm porting the OCOTEA u-boot package to a customer PPC440 board. In the process of debugging (non-CFI) Flash timeout functions, it appears that get_timer() is returning a value which increments every 10msec instead of 1 msec:

...

Quoted 1 line

Is this a real BUG? I can fix the flash related function which use the

Looks like a bug to me.

Best regards,

Wolfgang Denk