[U-Boot] [PATCH] AT91: Enable PLLB for USB

Stelian Pop stelian at popies.net
Tue Oct 21 23:20:44 CEST 2008


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 at popies.net>



More information about the U-Boot mailing list