Cache / Writebuffer & EMAC on AT91RM9200

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

Translate This Thread From English to

Threaded View
I want to design a software driver to interface the AT91RM9200 EMAC with a
tcp-ip stack.
As neither the datasheet nor their support makes this clear I presume:

I have to use the ARM9 MMU to set up a memory region in external RAM (SDRAM),
which is neither cachable nor writebuffered.

Only this way the software can communicate safely with the EMAC especially the
"receiver buffer pointers".

Is this the way it is supposed to be handled ?

I presume the ARM9 core will not "snoop" with it's cache any DMA activities
inside the AT91RM9200.

Raymund Hofmann



Re: Cache / Writebuffer & EMAC on AT91RM9200
Quoted text here. Click to load it
(SDRAM),
Quoted text here. Click to load it
the

Yes, the Buffer Descriptor List must not be cached.
The cache should also be flushed/invalidated for all packets being
sent/received.

Quoted text here. Click to load it
activities

No.

As an example, there is an EMAC driver in the ARM-Linux kernel
(2.4.21-rmk1).  http://www.arm.linux.org.uk/developer/v2.4 /
The driver is in the file: drivers/at91/net/at91_ether.c




Re: Cache / Writebuffer & EMAC on AT91RM9200

Quoted text here. Click to load it

How do I proceed to just get this file ? I am not on Linux, just cygwin.

Raymund Hofmann



Re: Cache / Writebuffer & EMAC on AT91RM9200

Quoted text here. Click to load it

Go to <http://www.kernel.org/ and download the source. Probably you have to
get the whole packet, but you also very probably need the headers to
understand what's going on.

To understand the Linux drivers, this book is the reference:

Alessandro Rubini & Jonathan Corbet, Linux Device Drivers, O'Reilly, ISBN
0-59600-008-1.

It's also in PDF format at <http://www.xml.com/ldd/chapter/book/ .

HTH

Tauno Voipio
tauno voipio @ iki fi




Re: Cache / Writebuffer & EMAC on AT91RM9200

Quoted text here. Click to load it

What exactly do you mean ?

linux-2.4.21.tar.bz2
patch-2.4.21-rmk1.bz2

Bunzip/tar linux, and what do I do with the patch... ?

Raymund Hofmann



Re: Cache / Writebuffer & EMAC on AT91RM9200

Quoted text here. Click to load it
have to

It's fairly probable that the patch is not needed. You should get the patch
README from the same place and check, whether it applies to the drivers
you're interested in.

Tauno Voipio
tauno voipio @ iki fi



Re: Cache / Writebuffer & EMAC on AT91RM9200

Quoted text here. Click to load it

In linux-2.4.21.tar.bz2 there is no file drivers/at91/net/at91_ether.c.

Only in the patch a file at91_ether.c is mentioned.
As it seemed not relative to a existing file, i just extracted it from there to
examine it.

Raymund Hofmann




Re: Cache / Writebuffer & EMAC on AT91RM9200
Quoted text here. Click to load it

goto http://www.arm.linux.org.uk/developer/v2.4 /, download 2.4.21-rmk1 (gzip
version) to a cygwin folder

run cygwin, go to the folder where "patch-2.4.21-rmk1.gz" is, type "gzip -d
patch-2.4.21-rmk1" , view file (e.g. vi patch-2.4.21-rmk1) and search for
"at91_ether"

this will allow you to look at the code, although not in the most effecient
way...





Re: Cache / Writebuffer & EMAC on AT91RM9200
Hi Raymond,
Im almost looking at the same ... in a month or two :-)
First I would like to know how you have connected the PHY - have you used
RMII or MII ?

What's the pro's and con's ???

Looking into the manuel (reference) on the ARM9, just states you save 4
extra pins ...
But are there any restrictions (apart from double PHY)  regarding the
performance, the netspeed or ???

regards,
john

Quoted text here. Click to load it
(SDRAM),
Quoted text here. Click to load it
the
activities



Site Timeline