From: Stelian Pop <stelian@popies.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] AT91: Enable PLLB for USB
Date: Tue, 21 Oct 2008 23:20:44 +0200 [thread overview]
Message-ID: <1224624044.7536.12.camel@galileo> (raw)
In-Reply-To: <3efb10970810211054t5627284fkf62b2971bf451ca2@mail.gmail.com>
Le mardi 21 octobre 2008 ? 19:54 +0200, Remy Bohmer a ?crit :
> Hello Stelian,
Hi Remy,
> Are all your USB stick problems solved by now? Including that stick
> that did not work?
Nope. I still have one (kinda old) stick which does not work, on any
AT91 board. But I suspect the issues are no longer in the board/cpu
code, but in the core USB layer.
> I will try your patches tomorrow, but I have one question:
> > #define AT91_MAIN_CLOCK 18432000 /* 18.432 MHz crystal */
> > #define AT91_MASTER_CLOCK 100000000 /* peripheral */
> > #define AT91_CPU_CLOCK 200000000 /* cpu */
>
> Are such nice rounded values possible with that unrounded crystal?
>
> Looking at sam9261 I see:
> #define AT91_MAIN_CLOCK 198656000 /* from 18.432 MHz crystal */
This one is clearly wrong. 18.432 MHz is 18432000 Hz.
> #define AT91_MASTER_CLOCK 99328000 /* peripheral = main / 2
And the master clock is not main / 2, but PLLA / 2, where PLLA is
initialized by the bootstrap to (main * 0x60) / 9.
This gives:
PLLA = 18432000 * 0x60 / 9 = 196608000 Hz
MASTER = 196608000 / 2 = 98304000 Hz.
The defines in the header files contain rounded values, I don't think
it's too important to be precise here.
Stelian.
--
Stelian Pop <stelian@popies.net>
next prev parent reply other threads:[~2008-10-21 21:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 16:07 [U-Boot] [PATCH ARM/AT91 0/4] AT91CAP9/AT91SAM9 bugfixes for 2008.12 Stelian Pop
2008-10-21 16:07 ` [U-Boot] [PATCH] AT91: Use AT91_CPU_CLOCK in displays Stelian Pop
2008-11-06 19:29 ` Jean-Christophe PLAGNIOL-VILLARD
2008-11-06 21:55 ` Stelian Pop
2008-11-06 22:51 ` Jean-Christophe PLAGNIOL-VILLARD
2008-10-21 16:07 ` [U-Boot] [PATCH] AT91: Enable PLLB for USB Stelian Pop
2008-10-21 17:54 ` Remy Bohmer
2008-10-21 21:20 ` Stelian Pop [this message]
2008-11-06 19:27 ` Jean-Christophe PLAGNIOL-VILLARD
2008-11-06 21:55 ` Stelian Pop
2008-11-06 22:52 ` Jean-Christophe PLAGNIOL-VILLARD
2008-10-21 16:08 ` [U-Boot] [PATCH] AT91: Replace AT91_BASE_EMAC by the board specific values Stelian Pop
2008-11-06 19:28 ` Jean-Christophe PLAGNIOL-VILLARD
2008-10-21 16:08 ` [U-Boot] [PATCH] AT91: Replace (undefined) AT91_ID_US* " Stelian Pop
2008-11-06 19:27 ` Jean-Christophe PLAGNIOL-VILLARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1224624044.7536.12.camel@galileo \
--to=stelian@popies.net \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.