This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ethernet device driver for ARM NET+50


On Mon, Dec 06, 2004 at 06:01:10PM +0100, Brandl Harald wrote:
> This patch contains an ethernet device driver for the ARM NET+50.


Hi Brandl

Attached is a version of the driver closer to being ready for
committing. I've changed a few things:

Move the header files into the src directory. There is no need to
export them to the rest of the world.

Added complete copyright headers to all the files. 

Added cyg_netarm_ prefixed to you global MII functions to avoid name
space polution. 

Added statics to a number of global variables to stop them being
global and so poluting the name space.

Reindented, expanded tabs, and folded some of your long lines.

Since you don't support reading the MAC address from eeprom, i changed
the CDL to always provide a MAC address. 

The biggest problem left is how you access the registers. What you do
probably works for you, but is not safe. You should use the HAL macros
as described at
http://ecos.sourceware.org/docs-latest/ref/hal-input-and-output.html

The problem with the way you access the registers is that the compiler
can optimize away some of the the accesses, rearrange the order
etc. Using these macros makes it safe.

Please could you take a look at this.

        Thanks
                Andrew

Attachment: netarm_eth.tgz
Description: GNU Unix tar archive


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]