public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] uboot clock configuration on mpc5200 boards
@ 2007-11-10 23:12 Jon Smirl
       [not found] ` <9e4733910711201700o75f74c20k243b42d2595491dd@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Jon Smirl @ 2007-11-10 23:12 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-11-21 13:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-10 23:12 [U-Boot-Users] uboot clock configuration on mpc5200 boards Jon Smirl
     [not found] ` <9e4733910711201700o75f74c20k243b42d2595491dd@mail.gmail.com>
2007-11-21  2:16   ` Grant Likely
2007-11-21  2:37     ` Jon Smirl
2007-11-21  7:01     ` Robert Schwebel
2007-11-21 11:21       ` Wolfgang Denk
2007-11-21 12:14         ` Robert Schwebel
2007-11-21 13:00           ` Wolfgang Denk
2007-11-21 13:41             ` Robert Schwebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox