From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stelian Pop Date: Tue, 21 Oct 2008 23:20:44 +0200 Subject: [U-Boot] [PATCH] AT91: Enable PLLB for USB In-Reply-To: <3efb10970810211054t5627284fkf62b2971bf451ca2@mail.gmail.com> References: <1224605281-15379-3-git-send-email-stelian@popies.net> <3efb10970810211054t5627284fkf62b2971bf451ca2@mail.gmail.com> Message-ID: <1224624044.7536.12.camel@galileo> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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