Skip to contentSkip to conversation

859/866 clock issues

U-Boot-Users Nye Liu 2 participants 4 messages Oct 18, 2003 – Oct 20, 2003

lore
Share & tools
lore

Nye Liu

author
#0 lore raw

two minor things on the 859/866

1) measure_gclk() is very inaccurate. Better to use the plprcr and CFG_8XX_XIN (which MUST BE 10MHz for that cpu) to derive the "real" bus clock.

2) the 859/866 does NOT support external speeds higher than 66MHz, so if cpu_clk is greater, EBDF01 MUST BE USED IN CFG_SCCR

I have a patch for 1, but i no longer have my 859/866 eval board

I have no patch for 2, but eventually we should come up with some sort of solution; the 859/866 is almost always configured to run faster than 66MHz.

Signature · 6 lines
Nye Liu
nliu at mrv.com
(818) 772-6235x248

"Who would be stupid enough to quote a fictitious character?"
	-- Don Quixote
#1 lore raw

hello,

Quoted 5 lines · in message <[email protected]> you wrote:

two minor things on the 859/866

1) measure_gclk() is very inaccurate. Better to use the plprcr and CFG_8XX_XIN (which MUST BE 10MHz for that cpu) to derive the "real" bus clock.

What do you mean by "very inaccurate" - the intention of the function (as documented) is to measure the "Approx. GCLK frequency in Hz". How bad is "very inaccurate" in your case?

Quoted 2 lines

2) the 859/866 does NOT support external speeds higher than 66MHz, so if cpu_clk is greater, EBDF01 MUST BE USED IN CFG_SCCR

I think this is the case for ALL MPC8xx processors so far. I have never seen one which would allow a bus clock > 66 MHz.

Quoted 1 line

I have a patch for 1, but i no longer have my 859/866 eval board

Maybe you can share it anyway.

Quoted 3 lines

I have no patch for 2, but eventually we should come up with some sort of solution; the 859/866 is almost always configured to run faster than 66MHz.

I don't see why a patch should be needed here. This is a simple matter of getting your board config file right, isn't it?

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"Infidels in all ages have battled for the rights of man, and have at
all times been the fearless advocates of liberty and justice."
- Robert Green Ingersoll
#2 lore raw
Quoted 5 lines · Wolfgang Denk

hello,

Quoted 2 lines · in message <[email protected]> you wrote:

two minor things on the 859/866

Quoted 7 lines
Quoted 3 lines

1) measure_gclk() is very inaccurate. Better to use the plprcr and CFG_8XX_XIN (which MUST BE 10MHz for that cpu) to derive the "real" bus clock.

What do you mean by "very inaccurate" - the intention of the function (as documented) is to measure the "Approx. GCLK frequency in Hz". How bad is "very inaccurate" in your case?

2-3%

the error of using plprcr + XIN is 0%, and given we know XIN is 10MHz for the 859/866 we are using that now.

Quoted 9 lines
Quoted 2 lines

2) the 859/866 does NOT support external speeds higher than 66MHz, so if cpu_clk is greater, EBDF01 MUST BE USED IN CFG_SCCR

I think this is the case for ALL MPC8xx processors so far. I have never seen one which would allow a bus clock > 66 MHz.

Quoted 1 line

I have a patch for 1, but i no longer have my 859/866 eval board

Maybe you can share it anyway.

i'll put something together this week, time permitting.

it will be ugly, but you can see what we tried to do.

Quoted 6 lines
Quoted 3 lines

I have no patch for 2, but eventually we should come up with some sort of solution; the 859/866 is almost always configured to run faster than 66MHz.

I don't see why a patch should be needed here. This is a simple matter of getting your board config file right, isn't it?

yes, but somebody really should add a note to the readme :)

time permitting i will try to.

-nye

#3 lore raw

Hello,

Quoted 10 lines · in message <[email protected]> you wrote:
Quoted 8 lines
Quoted 4 lines

1) measure_gclk() is very inaccurate. Better to use the plprcr and CFG_8XX_XIN (which MUST BE 10MHz for that cpu) to derive the "real" bus clock.

What do you mean by "very inaccurate" - the intention of the function (as documented) is to measure the "Approx. GCLK frequency in Hz". How bad is "very inaccurate" in your case?

2-3%

Well, 2...3% means you get 52 instead of 50 MHz? I don't think this is "very inaccurate" - it could be improved by dedicationg more time to the test, but IMHO this is sufficient.

Quoted 2 lines

the error of using plprcr + XIN is 0%, and given we know XIN is 10MHz for the 859/866 we are using that now.

But I don't want to make too many assumptions on "known" clock frequencies. I've seen more than one board where the PLL would _not_ lock on the intended clock frequency. It is very nice if you can _see_ that the board is running at 25 MHz even when it's configured for and assumed to be running at 50. This is the whole reason for this test.

Actually, I don't care about a 5% error here. If you do, please disable the function and #define CONFIG_8xx_GCLK_FREQ as you would do on any board without a 32768 Hz oscillator.

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

2) the 859/866 does NOT support external speeds higher than 66MHz, so if cpu_clk is greater, EBDF01 MUST BE USED IN CFG_SCCR

I think this is the case for ALL MPC8xx processors so far. I have never seen one which would allow a bus clock > 66 MHz.

...

Quoted 4 lines
Quoted 2 lines

I don't see why a patch should be needed here. This is a simple matter of getting your board config file right, isn't it?

yes, but somebody really should add a note to the readme :)

Ummm... I disagree. It seems obvious to me that you should not run your processor out of specifications, and it is not the purpose of the U-Boot README file to duplicate Motorola's processor specs.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
If I had to live my life again,  I'd  make  the  same  mistakes, only
sooner.                                          -- Tallulah Bankhead