On Mon, 2010-01-04 at 11:01 -0800, elbert shiang wrote:
> Hi, Dear All:
>
> Is anyone can tell me how to start to read/write a Ethernet port for
> DM355? What is the documentation I should refer to?
>
Don't know about documents, but you can look at the code for DM355 EVM
as a reference. The DM355 EVM uses DM9000. A read example can be found
in
drivers/net/dm9000.c function dm9000_rx()
...
writeb(DM9000_MRCMD, db->io_addr);
(db->inblk)(db->io_data, &rxhdr, sizeof(rxhdr));
...
In other words, you setup the address you want to read by writing
DM9000_MRCMD (0xF2) to db->io_addr (ioremap 0x04014000) and read the
data from db->io_data (ioremap 0x04014004). Values for db->io_addr and
db->io_data comes from board specific setup code (ie
arch/arm/mach-davinci/board*.c).
A write example can be found in dm9000_start_xmit().
Regards,
Steve
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source