[U-Boot-Users] BRGs on ep8248 after updating CLKIN

Jerry Van Baren gerald.vanbaren at ge.com
Thu Nov 29 22:00:20 CET 2007


Alan Bennett wrote:
> When I originally supported my ep8248-style board, I had
> #define CONFIG_8260_CLKIN	66000000	/* in Hz */
> 
> However, I noticed (after far too much time had passed) that my cpu
> speed wasn't matching my expectations.  (reported 230 MHz, and
> expected 350 MHz).
> 
> This was rather easily fixed by changing the CONFIG_8260_CLKIN to 100 MHz:
> #define CONFIG_8260_CLKIN	100000000	/* in Hz */
> 
> However, my BRGs / SMC1 uart is now broke(baud-rate mismatch).  Does
> anyone have experience with this section of u-boot that could help me
> out?
> 
> My BRG7 is configured by u-boot(1.3+) = 0x00010078 ~ CD = 60 (0x3c).
> And there is an apparent baud-rate mismatch and all the output is
> garbled now.  (with a scope I measured ~ 25.5 / 26 K, when I'm
> expecting 38.4k)
> 
> I think I'm missing something in the equation, but I'm not sure where
> it is.  If I simply update the CD to be 162 (162*38400*16 = 99,532,800
> ~ 100 MHz) the serial port is still dead.
> 
> Any ideas?

Hi Alan,

I suspect that your clock is really 66MHz (read it off the crystal, that 
is the definitive authority).  Generally BRGs don't lie - if your 
CONFIG_8260_CLKIN doesn't match the actual crystal, your baud rate is 
going to be wrong.  Your baud rate is right when CONFIG_8260_CLKIN is 
set to 66MHz and wrong when set to 100MHz - pretty strong evidence.

My theory is that your crystal is 66MHz but your CPU multiplier is 
misconfigured.  In the 8260 the CPU multiplier is selected by the HRCW 
(MODCK_H) _and_ some physical pins on the CPU (MODCK[1-3]) - your 8248 
may be different.

HTH,
gvb




More information about the U-Boot mailing list