possible problem in u-boot-0.2.0/cpu/mpc8xx/cpu_init.c
I am just porting u-boot to our TOP860 module, which uses 50MHz/80Mhz core clock and 25MHz/40MHz Bus Clock (EBDF=1).
I noticed that in cpu_init.c/line 77ff the PLPRCR is written before SCCR which will cause the CLKOUT to ramp up to 50 MHz before it is being reduced to half the frequency. That might violate alot of timings. It does not appear to cause any problems right now; but I would suggest anyway to change the order there.
Regards Reinhard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20030205/12752e41/attachment.htm
Quoted 3 lines · In message <[email protected]> you wrote:
I am just porting u-boot to our TOP860 module, which uses 50MHz/80Mhz core clock and 25MHz/40MHz Bus Clock (EBDF=1).
Is your HRCW set that way, too?
Quoted 5 lines
I noticed that in cpu_init.c/line 77ff the PLPRCR is written before SCCR which will cause the CLKOUT to ramp up to 50 MHz before it is being reduced to half the frequency. That might violate alot of timings. It does not appear to cause any problems right now; but I would suggest anyway to change the order there.
You are not supposed to change the EBDF setting. The code reads:
...
90
91 /* System integration timers. Don't change EBDF! (15-27) */
92
...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 Unix is supported by IBM, like a hanging man is supported by rope. - Don Libes & Sandy Ressler: _Life With Unix_
No, that is why we change it afterwards.
The Processor starts with 32kHz*512,
then EBDF is set (external clock down to 8MHz, does not affect reading the FLASH)
then the PLL MF is set for the desired Core Clock (in our other Ports for OS-9, Metrowerks, EMKstax)
I cannot find any reference in the 860UM that forbids changing the EBDF from the initial HRCW setting...
Quoted 13 lines
Quoted 3 lines · In message <[email protected]> you wrote:
I am just porting u-boot to our TOP860 module, which uses 50MHz/80Mhz core clock and 25MHz/40MHz Bus Clock (EBDF=1).
Is your HRCW set that way, too?
Quoted 5 lines
I noticed that in cpu_init.c/line 77ff the PLPRCR is written before SCCR which will cause the CLKOUT to ramp up to 50 MHz before it is being reduced to half the frequency. That might violate alot of timings. It does not appear to cause any problems right now; but I would suggest anyway to change the order there.
Quoted 5 lines
You are not supposed to change the EBDF setting. The code reads:
... 90 91 /* System integration timers. Don't change EBDF! (15-27)
*/
Quoted 2 lines
92
...Quoted 2 lines · In message <[email protected]> you wrote:
The Processor starts with 32kHz*512,
Did you measure the time it takes after power-on before the CPU executes the first instruction? This is the first system I see that boots like this, so I'm curious.
Why do you do it this way?
Quoted 2 lines
I cannot find any reference in the 860UM that forbids changing the EBDF from the initial HRCW setting...
It's not exactly forbidden, but U-Boot does not expect this. And no other board I've ever seen does it this way.
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
He'd heard her use that sweet, innocent tone of voice before. It
meant that, pretty soon, there was going to be trouble.
- Terry Pratchett, _Truckers_After Power-On PONReset is held active for about 300ms. After that:
Page 15-7 states that there will be no clock until the PLL stabilizes. Booting with MODCK=00 is one of the possible ways to Clock the MPC860 and requires a 32768 Hz crystal, see page 15-7
The board is a companion to a Pin-Compatible MC68360 board which runs off a 32768 Hz crystal, too.
There was no obvious reason NOT to do it the same way for the MPC860, but it gives you full freedom at what speeds you want to run the board (and how much heat you want to produce, the 80MHz Version definitely needs a heat-sink)...
The question I have put up is not whether it is usual to do it that way (we do it for all our 8xx designs that way),
but whether it is possible to change the order in cpu_init.c generally or whether I have to do that with a nasty #if defined(TOP860). So far I did not need to touch any sources outside
the (new) board/emk/top860 directory, and I would prefer to keep it that way
once the port is finished, I will of course submit that directory and the changes to MAKEALL and Makefile
(need to finish the FLASH driver, since we use ONE 16-bit wide FLASH, and need to finish the PHY driver,
since we support auto detection of Fiber, 10/100 HD/FD with the Am974...)
Regards
Reinhard
Quoted 11 lines
Quoted 2 lines · In message <[email protected]> you wrote:
The Processor starts with 32kHz*512,
Did you measure the time it takes after power-on before the CPU executes the first instruction? This is the first system I see that boots like this, so I'm curious.
Why do you do it this way?
Quoted 1 line
I cannot find any reference in the 860UM that forbids changing the EBDF
from
Quoted 4 lines
Quoted 1 line
the initial HRCW setting...
It's not exactly forbidden, but U-Boot does not expect this. And no other board I've ever seen does it this way.
Quoted 6 lines · In message <[email protected]> you wrote:
I noticed that in cpu_init.c/line 77ff the PLPRCR is written before SCCR which will cause the CLKOUT to ramp up to 50 MHz before it is being reduced to half the frequency. That might violate alot of timings. It does not appear to cause any problems right now; but I would suggest anyway to change the order there.
I tested the suggested change on a couple of systems, and found no negative effects, so I applied it. Sorry this took so long. Will show up on CVS in a couple of hours.
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
If it's working, the diagnostics say it's fine. If it's not working,
the diagnostics say it's fine.
- A proposed addition to rules for realtime programming