
On 11/20/07, Jon Smirl jonsmirl@gmail.com wrote:
On the Linux kernel the mpc52xx_setup_cpu() function used to do this fix up. Does uboot handle this for mpc5200 boards? If so, which version?
uboot is accessing these registers but it is not clear to me if the clocks are completely being set up.
The 5200lite code has been changed to this:
/*
- Fix clock configuration.
- Firmware is supposed to be responsible for this. If you are creating a
- new board port, do *NOT* duplicate this code. Fix your boot firmware
- to set it correctly in the first place
*/ static void __init lite5200_fix_clock_config(void) {
----8<----snip---->8----
}
Is uboot setting this up correct now that they kernel has been changed?
Strictly speaking; firmware should be responsible for configuring the SoC (clocks, pinouts, etc). It makes it easier to add new boards if each one doesn't need it's own fixups.
I haven't checked the clock setup for lite5200 in u-boot yet, but it is not a complex change. And even if I do change it for the lite5200 in u-boot; this code probably won't go away in the kernel so as not to break compatibility with lite5200's with older u-boot firmware.
The point is that firmware should setup the CPU correctly at boot. It should not be Linux's responsibility. However, if there is *existing* firmware that needs to be supported; then I'll grudgingly accept hacks like this to keep the board bootable. If it is a new board, do it right the first time and do it in firmware (be it u-boot or otherwise)
Cheers, g.