Cache / Writebuffer & EMAC on AT91RM9200

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

Reply to
raymund hofmann
Loading thread data ...

(SDRAM),

the

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

activities

No.

As an example, there is an EMAC driver in the ARM-Linux kernel (2.4.21-rmk1).

formatting link
The driver is in the file: drivers/at91/net/at91_ether.c

Reply to
Simon Berry

"Simon Berry" schrieb im Newsbeitrag news:3f549967$0$ snipped-for-privacy@hades.is.co.za...

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

Raymund Hofmann

Reply to
raymund hofmann

Go to 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 .

HTH

Tauno Voipio tauno voipio @ iki fi

Reply to
Tauno Voipio

goto

formatting link
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...

Reply to
Simon Berry

"Tauno Voipio" schrieb im Newsbeitrag news:dEf5b.46$% snipped-for-privacy@read3.inet.fi...

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

Reply to
raymund hofmann

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

Reply to
Tauno Voipio

"Tauno Voipio" schrieb im Newsbeitrag news:iGm5b.313$% snipped-for-privacy@read3.inet.fi...

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

Reply to
raymund hofmann

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

"raymund hofmann" skrev i en meddelelse news:bj1qp7$3bp$ snipped-for-privacy@online.de...

(SDRAM),

the

activities

Reply to
JoKaas

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.