2009-05-24 04:44:58     Problem about porting DM9000A to U-boot-1.1.6

Document created by Aaronwu Employee on Sep 18, 2013
Version 1Show Document
  • View in full screen mode

2009-05-24 04:44:58     Problem about porting DM9000A to U-boot-1.1.6

Wang Mengyin (CHINA)

Message: 74498   


Hi everybody !


I get a problem when I try to porting DM9000A Driver to my custom board!


The DM9000A works fine with U-boot-1.1.5-bf1. But when I try to port it to U-Boot-1.1.6-2008R1.5. It failed!


Here's my modification steps!  The original setting I used is bf533-stamp. I annotate its SMC91111 Driver in include/configs/mybf532.h file.Just like this.


70 //#define ADI_CMDS_NETWORK      1

71 //#define CONFIG_DRIVER_SMC91111        1

72 //#define CONFIG_SMC91111_BASE  0x20300300

73 //#define SMC91111_EEPROM_INIT()        { *pFIO_DIR = 0x01; *pFIO_FLAG_S = 0    x01; SSYNC(); }

74 //#define CONFIG_HOSTNAME               bf533-stamp

75 ///* To remove hardcoding and enable MAC storage in EEPROM  */

76 ///* #define CONFIG_ETHADDR     02:80:ad:20:31:b8 */



and I add DM9000A setting


78 #define ADI_CMDS_NETWORK      1 /*using ADI's default setting which defines     in the configs/bfin_adi_common.h */

79 #define CONFIG_DRIVER_ETHER     1

80 #define CONFIG_DRIVER_DM9000    1

81 #define CONFIG_DRIVER_DM9000A   1

82 #undef  CONFIG_DM9000_HAVE_EEPROM       /* MAC address is in enviroment*/



91 #define CONFIG_DM9000_BASE              0x20300000

92 #define DM9000_IO                       CONFIG_DM9000_BASE

93 #define DM9000_DATA                     (CONFIG_DM9000_BASE+4)

94 /* #define CONFIG_DM9000_USE_8BIT */

95 #define CONFIG_DM9000_USE_16BIT

96 /* #define CONFIG_DM9000_USE_32BIT */

97 #define CONFIG_HOSTNAME               mybf532



The driver I use locate in /driver/dm9000x.h file.


Here's the U-boot output message via UART


U-Boot 1.1.6 (ADI-2008R1.5) (May 24 2009 - 16:13:18)


CPU:   ADSP bf532-0.5 (Detected Rev: 0.5)

Board: Wang's MYBF532 board

       Support: http://tigerwang202.blogbus.com/

Clock: VCO: 324 MHz, Core: 324 MHz, System: 54 MHz

RAM:   32 MB

Flash:  2 MB

In:    serial

Out:   serial

Err:   serial

Net:   MAC:   02:80:AD:20:31:B8

Hit any key to stop autoboot:  0

bfin> ping

dm9000 not found at 0x20300000 id: 0x000a4600

MAC: 00:ff:00:ff:00:ff

operating at unknown: 0 mode


As the message shown above, the DM9000A didn't recongized by U-boot. But the DM9000A can work in U-Boot-1.1.5-bf1.


Please give me some suggestion! I will greatly appreciate all your help. Thanks!




2009-05-24 23:37:33     Re: Problem about porting DM9000A to U-boot-1.1.6

Sonic Zhang (CHINA)

Message: 74512   


I am sorry, which uboot release did you use before? U-Boot-1.1.5-bf1 was not released by us.




2009-05-25 06:32:14     Re: Problem about porting DM9000A to U-boot-1.1.6

Wang Mengyin (CHINA)

Message: 74534   


This U-Boot is from BlackfinOne BF532 Project which locates in blackfin.uclinux.org. You can find it in Project Section.


According to the description of author, he modified the original U-boot-1.1.5 which was released by ADI offical.


The auther add DM9000A support to U-Boot-1.1.5. I try to transplant its driver to U-boot-1.1.6. But failed.


the driver didn't work properly. I find the problem is in the file DM9000x.c line 428 - 443


428         u16 val=0, val_old=0;

429         if(!((val=phy_read (dm, 1)) & 0x20)) {

430                 do {

431                         if(val != val_old)

432                                 DM9000_DBG ("\nIce: val = [%x]\n", val);

433                         DM9000_DBG ("\r i = [%d]",i);

434                         udelay (2000);

435                         //udelay (500);

436                         i++;

437                         if (i == 10000) {

438                                 printf ("could not establish link\n");

439                                 return 0;

440                         }

441                         val_old = val;

442                 } while (!((val=phy_read (dm, 1)) & 0x20));

443         }



it seems this loop can not break. the DM9000A device can not response the command. But if I define multiple Ethernet card , it driver seems work normally.


I just add following line in my board config file:


#define CONFIG_NET_MULTI        1



I am very curious that The driver can only work in Multiply mode even if my board has one DM9000A chip.And I notice that in there are slightly different in eth.c file( which was in NET directory) . the multiply mode did initialization in the beginning, so does ADI's driver. But I DON'T know how does it works. As for orignial DM9000A driver in U-Boot-1.1.6, it didn't work.


Can anybody help me?




2009-05-25 22:55:06     Re: Problem about porting DM9000A to U-boot-1.1.6

Mike Frysinger (UNITED STATES)

Message: 74558   


CONFIG_NET_MULTI is becoming the default and any board not using that is obsolete