public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] main clock calculation invalid
@ 2007-04-19 15:42 Junior
  2007-04-19 15:54 ` Wolfgang Denk
  0 siblings, 1 reply; 8+ messages in thread
From: Junior @ 2007-04-19 15:42 UTC (permalink / raw)
  To: u-boot

Hi all,
I'm trying to figure out why the below calculation of my main frequencey clock is not correct.

In the below equation:
maindiv2 = 28
maindiv1 = 13
prediv = 23
ps = 0
and CONFIG_SYS_CLK_FREQ is 14745600.

but I get 93622108 instead of 265420800. How is this possible?

here is the equation which is what get_FCLK returns:

   return (((maindiv2 + 2) * (maindiv1 + 2) * CONFIG_SYS_CLK_FREQ) / 
             ((prediv + 2) * (1 << ps)));

much thanks.
--Jr.

____________________________________________________________
GET FREE 5GB ONLINE STORAGE - Safely store your documents, photos and music online!
Visit http://www.inbox.com/storage to find out more!

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <06d6e1270e8.0000028aejr@inbox.com>]

end of thread, other threads:[~2007-04-20  9:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-19 15:42 [U-Boot-Users] main clock calculation invalid Junior
2007-04-19 15:54 ` Wolfgang Denk
2007-04-19 16:16   ` Junior
2007-04-19 18:14     ` Wolfgang Denk
2007-04-19 18:51     ` Junior
2007-04-20  7:17       ` Martin Krause
2007-04-20  8:18         ` Wolfgang Denk
2007-04-20  9:18           ` Martin Krause
     [not found] <06d6e1270e8.0000028aejr@inbox.com>

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