[U-Boot-Users] uboot clock configuration on mpc5200 boards

Jon Smirl
2007-11-10T23:12:17Z

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)
{
struct mpc52xx_cdm __iomem *cdm;

/* Map zones */
cdm = mpc52xx_find_and_map("mpc5200-cdm");
if (!cdm) {
printk(KERN_ERR "%s() failed; expect abnormal behaviour\n",
__FUNCTION__);
return;
}

/* Use internal 48 Mhz */
out_8(&cdm->ext_48mhz_en, 0x00);
out_8(&cdm->fd_enable, 0x01);
if (in_be32(&cdm->rstcfg) & 0x40) /* Assumes 33Mhz clock */
out_be16(&cdm->fd_counters, 0x0001);
else
out_be16(&cdm->fd_counters, 0x5555);

/* Unmap the regs */
iounmap(cdm);
}

--
Jon Smirl
jonsmirl at gmail.com