Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

problem with dm9000a

Altera_Forum
Honored Contributor II
1,598 Views

Hello everyone: 

 

I want to enable network of uClinux on my custom board, but there seems to be some problem.. 

 

1, I can&#39;t see the "<DM9000x> I/O: 80900090, VID: 90000a46 and eth0" message during the boot up process; 

2, When I use ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx command, it shows "SIOCSIFHWADDR: no such device". 

 

By the way,I use dm9000a on my board, and I enable the "davicom dm9000 10_100 Ethernet chip support" in kernel. 

My uClinux version is Microtronix Nios II Linux Distribution V1.4, and the kernel is 2.6.11. 

 

Who knows how to solve the problem, please give me some suggestions, thanks. 

I suspect the device driver can&#39;t support dm9000a but only dm9000, but I&#39;m not sure..  

 

 

0quanquan0
0 Kudos
9 Replies
Altera_Forum
Honored Contributor II
584 Views

You can use uClinux-dist-20070130 with nios2 patches. The dm9ks is a updated driver for DM9000A. 

Please find it in the wiki.
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

Hi hippo: 

Thank you for your help. 

But the link for uClinuxdist070130 is not available now. The leader and the project is waiting for me...I am so upset. 

Can you just send the dm9ks.h and dm9k.c to me? 

My email is denghuan5608@gmail.com 

Thanks very much!!! 

 

Sincerely  

0quanquan0
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

It seems their server is down. 

You can find the dm9ks in nios2 patches to it. 

http://nioswiki.jot.com/wikihome/operating...ios2-02.diff.gz (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/uclinuxdist/uclinux-dist-20070130-nios2-02.diff.gz

 

I am sending 20070130 to a file sharing host. wait a moment.
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

Since you are using a custom board, have you tested the io ports access of the chip? 

You should check the hardware first.
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

I recalled that I had tested the DM9000A on a DE2 board using the dm9000x.c in 2.6.11 kernel. 

So the old driver should work.
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

Hi hippo: 

Thank you very much. I have downloaded the .diff file.  

Now the situation is I don&#39;t have uClinuxdist enviroment in my computer(But I will learn and use it soon..). To solve my current problem, can you tell me how can I get the dm9k.c from the .diff? 

Excuse for my stupid question, thanks again... 

 

Sincerely 

0quanquan0
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

gunzip uClinux-dist-20060803-nios2-02.diff.gz 

you will get uClinux-dist-20060803-nios2-02.diff 

edit this file, and you can find dm9ks stuff. 

note you need to update arch/nios2nommu/setup.c, drvers/next/ Spcae.c, Makefile and Kconfig. 

 

But I wonder there are problems in your hardware, so you should try to add some debug messages and dump in the old dm9000x.c . Using a new driver won&#39;t work on a bad hardware. 

 

And the link to uClinux-dist-20070130, 

http://s4.quicksharing.com/v/2589078/uclin...30.tar.bz2.html (http://s4.quicksharing.com/v/2589078/uclinux_dist_20070130.tar.bz2.html)
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

 

--- Quote Start ---  

originally posted by hippo@Mar 30 2007, 12:05 PM 

gunzip uclinux-dist-20060803-nios2-02.diff.gz 

you will get uclinux-dist-20060803-nios2-02.diff 

edit this file, and you can find dm9ks stuff. 

note you need to update arch/nios2nommu/setup.c, drvers/next/ spcae.c, makefile and kconfig. 

 

but i wonder there are problems in your hardware, so you should try to add some debug messages and dump in the old dm9000x.c . using a new driver won&#39;t work on a bad hardware. 

 

and the link to uclinux-dist-20070130, 

http://s4.quicksharing.com/v/2589078/uclin...30.tar.bz2.html (http://s4.quicksharing.com/v/2589078/uclinux_dist_20070130.tar.bz2.html

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=22651) 

--- quote end ---  

 

--- Quote End ---  

 

 

 

Thank you so much, hippo. 

I follow the steps instructed by you, as below(I &#39;m not sure all of the steps are right, so I would like your checking, thanks:): 

1, Create a txt file named dm9ks.c in driver/net, and paste the dm9ks.c code (found in .diff) into it; 

 

2, update setup.c by adding "|| (CONFIG_DM9KS_ETH)" after "#if defined (CONFIG_CS89x0) || (CONFIG_SMC91111) || (CONFIG_OPEN_ETH) || (CONFIG_MTIP1000_ETH) || (CONFIG_DM9000_ETH)"# two place# 

 

3, update space.c by adding "#if defined(CONFIG_DM9KS_ETH) 

{dmfe_probe, 0}, 

# endif" 

 

4, update net/Kconfig by adding " config DM9KS_ETH 

bool "DM9KS DM9000A support" 

help 

This is support for the Davicom DM9000A Ethernet chip." 

 

5, update the net/makefile by adding "obj-$(CONFIG_DM9KS_ETH) += dm9ks.o" 

 

 

But the result seems to be not change.. 

 

I do checked the hardware(it is not design by myself), about the components, the pins and so on, Maybe I should do some deep work, I will. 

And Now I doubt whether the uClinux provided by microtronix supports the dm9000a... 

Dose anyone use microtronix uClinux on DE2 successfully?Please tell me.. 

 

hippo, thanks again, for your time and your warmheart. I have learned a lot during the process. 

Good Luck! 

 

Sincerely  

0quanquan0
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

Well, you are very close to add the dm9ks driver. But please put it away for a while. 

 

I said, "I had tested the DM9000A on a DE2 board using the dm9000x.c in 2.6.11 kernel.". 

That is the one of Microtronix release 1.4. 

 

The DM9000 and DM9000A , both chips have the same Vendor/Product ID. And they can use the same drivers, dm9000x or dm9ks. 

 

The things what you should do at this moment is, adding debug message to your dm9000x.c , 

in the dmfe_probe() function,  

 

Index: dm9000x.c 

=================================================================== 

--- dm9000x.c (revision 12) 

+++ dm9000x.c (working copy) 

@@ -414,6 +414,11 @@ 

// id_val |= inb(iobase + 4) << 24; 

id_val |= ior(db, DM9000_PID_H) << 24; 

 

+ printk("<DM9000> debug %s I/O: %x, VID: %x \n", 

+ dev->name, 

+ iobase, 

+ id_val); 

if (id_val == DM9000_ID) { 

 

printk("<DM9000> %s I/O: %x, VID: %x \n", 

 

If it does not even display this debug message, then check if you config this driver correctly. 

 

If it displays strange ID value, change the detection to loop for ever, check your hardware, with a scope or signal-tap. 

 

In the long run, you should really setup a Linux PC and build uClinux-dist.
0 Kudos
Reply