Linux on AT91RM9200

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello,

I'm designing a system based on ATMEL AT91RM9200 SOC.

The system will run under Linux.

I've couple of quetsion regarding processor initialisation code.

I'm trying to find this code in the linux 2.4 kernel sources and unable to
locate it.
In particular i'm looking for the code initializing the processor internal
PLLs and selecting the master clock source.

Looking in the include/asm-arm/arch-at91rm9200/at91rm9200dk.h

i see following code and comments

 #define AT91C_MAIN_CLOCK 179712000 /* from 18.432 MHz crystal (18432000 / 4
* 39) */
 #define AT91C_MASTER_CLOCK 59904000 /* peripheral clock
(AT91C_MASTER_CLOCK / 3) */

BTW the second comment id erroneous it should be  /* peripheral clock
(AT91C_MAIN_CLOCK / 3) */


These 4 and 39 constants are apparently parameters for PLL divider and
multiplyer
But i'm unable to locate the code where these values are actually programmed
into the PLL control registers.

My hardware will be a subset of  at91rm9200dk with a twist. I'd like to
scrap the 50 MHZ oscilator
used to drive RMII REFCLK and istead to connect the at91rm9200 to the 25 Mhz
crystal and derive then
the 50MHZ from one of the PMC outputs.

Any suggestions or pointers?
Thanks
Vadim Lebedev
CTO
7Chips








Re: Linux on AT91RM9200
Quoted text here. Click to load it

It is not the Linux Kernel's responsibility to do such initialisation - this
is done by the bootloader. The Atmel supported version is U-boot - available
at sourceforge.

Quoted text here. Click to load it
Mhz

Don't do this.

From bitter experience, I can tell you that this won't work. The problem is
that a 50MHz clock generated by the PMC is not stable enough for RMII. You
will find that Ethernet packets over a certain length (approx 300 bytes)
loose synchromisation to the clock and are dropped.

If you want to save the cost of an oscillator, I would suggest using a
crystal on your phy and using MII rather than RMII.

Simon



Re: Linux on AT91RM9200
Simon,

Thanks a lot for the advice


Vadim

Quoted text here. Click to load it
to
internal
this
available
is



Re: Linux on AT91RM9200
Simon,


I've filed to find the the PLL initialisatoin code int the u-boot source....

Can you please point me to the exact file?


Thanks
Vadim

Quoted text here. Click to load it
to
internal
this
available
is



Re: Linux on AT91RM9200
Quoted text here. Click to load it

There is a file "initboot.c". Function is AT91F_InitClocks


Adrian

Re: Linux on AT91RM9200
Not in the u-boot which is available on sourceforge


Vadim

Quoted text here. Click to load it
source....



Re: Linux on AT91RM9200
Get the AT91 CD,
Das U-Boot there contains what You need.


--
Best Regards
Ulf at atmel dot com
We've slightly trimmed the long signature. Click to see the full one.
Re: Linux on AT91RM9200

Quoted text here. Click to load it

...

Ummm.. why is there soemthing on a proprietary  CDROM  which  is  not
available on the publich CVS server, too?

Did I reject this???

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88   Web: www.denx.de
We've slightly trimmed the long signature. Click to see the full one.
Re: Linux on AT91RM9200
I am not sure,
The code is probably in "boot.bin" which is loaded into SRAM at reset.
boot.bin will unzip U-boot.
I do not know if this is actually considered part of u-boot.

The CD is available free of charge.

--
Best Regards
Ulf at atmel dot com
We've slightly trimmed the long signature. Click to see the full one.
Re: Linux on AT91RM9200
Check the September 2003 CD-ROM for AT91RM9200DK board.

Quoted text here. Click to load it

Site Timeline