2009-09-26 03:51:17     DM9000A not found on U-Boot 2008.10

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

2009-09-26 03:51:17     DM9000A not found on U-Boot 2008.10

Wang Mengyin (CHINA)

Message: 80484   

 

Hi Guys! I get a problem when porting U-Boot 2008.10(ADI-2009R1-rc3) to my own blackfin board.

 

U-Boot can not probe DM9000A chip. It can work on U-Boot-1.1.6 version and uClinux kernel. So I don't think it's the hardware's problem.

 

Here is the output message:

 

Clock: VCO: 378 MHz, Core: 378 MHz, System: 94.500 MHz

RAM:   32 MB

SF: Got idcode 20 20 17

In:    serial

Out:   serial

Err:   serial

Net:   No ethernet found.

MAC:   00:00:00:00:00:00

Hit any key to stop autoboot:  0

 

 

And my board config file in folder include/configs/

 

62 #define ADI_CMDS_NETWORK        1

63 #define CONFIG_DRIVER_ETHER     1

64 #define CONFIG_NET_MULTI        1

65 //#define NET_RETRY_COUNT               20

66 #define CONFIG_DRIVER_DM9000    1

67

68 #define CONFIG_DM9000_BASE      0x20100000

69 #define DM9000_IO               CONFIG_DM9000_BASE

70 #define DM9000_DATA             (CONFIG_DM9000_BASE+2)

71 #define CONFIG_DM9000_USE_16BIT 1

72 #define CONFIG_DM9000_NO_SROM   1

73 #define CONFIG_HOSTNAME         obb532

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

75 #define CONFIG_ETHADDR  02:80:ad:20:31:b8

TranslateQuoteReplyEditDelete

 

 

2009-09-26 04:06:53     Re: DM9000A not found on U-Boot 2008.10

Wang Mengyin (CHINA)

Message: 80485   

 

It seems the error generate from the function "eth_initialize()" in file eth.c which was called by board_init_r() in file lib_blackfin\board.c during the 2 stage of U-boot starting  process.

TranslateQuoteReplyEditDelete

 

 

2009-09-26 04:54:12     Re: DM9000A not found on U-Boot 2008.10

Wang Mengyin (CHINA)

Message: 80487   

 

I comment the following config line :

 

64 //#define CONFIG_NET_MULTI      1

 

the driver didn't work ether.

 

Here is the error message:

 

bfin> ping 10.21.11.65

eth_halt

phy_write(reg:0x0, value:0x8000)

eth_init()

resetting DM9000

resetting the DM9000, 1st reset

resetting the DM9000, 2nd reset

ERROR: resetting DM9000 -> not responding

dm9000 not found at 0x20100000 id: 0x000a4690

eth_halt

phy_write(reg:0x0, value:0x8000)

ping failed; host 10.21.11.65 is not alive

TranslateQuoteReplyEditDelete

 

 

2009-09-26 08:02:20     Re: DM9000A not found on U-Boot 2008.10

Wang Mengyin (CHINA)

Message: 80488   

 

I modify the function DM9000_ior() in file driver/net/dm900x.c.

 

DM9000_ior() in u-boot-1.1.5 is:

 

// Read a byte from I/O port

static u8 DM9000_ior (dm9000x_info_t *dm, int reg) {

 

DM9000_outb (reg, dm-> io);

asm ("ssync;");

return DM9000_inb (dm-> data);

}

 

But in u-boot-2008 is

 

static u8

DM9000_ior(int reg)

{

DM9000_outb(reg, DM9000_IO);

return DM9000_inb(DM9000_DATA);

}

 

I added asm ("ssync;"); then

 

bfin> ping 10.21.11.65

dm9000 i/o: 0x20100000, id: 0x90000a46

DM9000: running in 16 bit mode

MAC: 02:80:ad:20:31:b8

operating at 100M full duplex mode

rx length too big

DM9000 error: status check fail: 0x3

ping failed; host 10.21.11.65 is not alive

 

 

proble() function seems work. but still can't work!

 

Ack! Something bad happened to the Blackfin!

 

SEQUENCER STATUS:

SEQSTAT: 0000c000  IPEND: 8030  SYSCFG: 0032

  HWERRCAUSE: 0x3: external memory addressing error

  EXCAUSE   : 0x0: custom exception

  physical IVG15 asserted : <0x01fc053c> { _evt_default + 0x0 }

RETE: <0xffa091fc> { __etext_l1 + 0x11d4 }

RETN: <0x96230ae4> { ___smulsi3_highpart + 0x9425f74c }

RETX: <0x28c9b508> { ___smulsi3_highpart + 0x26cca170 }

RETS: <0x01fcb58e> { _readline_into_buffer + 0x3fa }

RETI: <0x01fc1462> { _strcpy + 0xe }

 

PROCESSOR STATE:

R0 : 000000ff    R1 : 0003e800    R2 : 00000041    R3 : 0000000d

R4 : 00000001    R5 : 01fd53e4    R6 : 0003e800    R7 : 00000002

P0 : 02000002    P1 : 01fdf874    P2 : 0005ef8e    P3 : 01fdf874

P4 : 01f5ffa8    P5 : 01f5ff80    FP : 01f5fea8    SP : 01f5fda0

LB0: 01fc0d3e    LT0: 01fc0d3c    LC0: 00000000

LB1: 01fcce5a    LT1: 01fcce4c    LC1: 00000000

B0 : e0d07415    L0 : 00000000    M0 : af8cbf48    I0 : 0001ce7c

B1 : 3caca55b    L1 : 00000000    M1 : ad8cb61f    I1 : 01fdaae8

B2 : f4bcbf58    L2 : 00000000    M2 : cdd63e57    I2 : b8822737

B3 : bab2cc53    L3 : 00000000    M3 : 1dfbb80c    I3 : a4917727

A0.w: 0079f000   A0.x: 00000000   A1.w: 00000948   A1.x: 00000000

USP : ff8061f4  ASTAT: 00001025

 

Hardware Trace:

   0 Target : <0x01fc0b24> { _bfin_panic + 0x0 }

     Source : <0x01fc0592> { _evt_default + 0x56 }

   1 Target : <0x01fc053c> { _evt_default + 0x0 }

     Source : <0x01fc1460> { _strcpy + 0xc }

   2 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

   3 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

   4 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

   5 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

   6 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

   7 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

   8 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

   9 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

  10 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

  11 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

  12 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

  13 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

  14 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

  15 Target : <0x01fc145c> { _strcpy + 0x8 }

     Source : <0x01fc1462> { _strcpy + 0xe }

 

### ERROR ### Please RESET the board ###

TranslateQuoteReplyEditDelete

 

 

2009-09-26 08:17:29     Re: DM9000A not found on U-Boot 2008.10

Mike Frysinger (UNITED STATES)

Message: 80489   

 

that ssync has never been in Blackfin releases, so if it's in your source base, it's because someone added it.  you should find that someone and ask them what all changes they made to the source tree in order to get the dm part working.

QuoteReplyEditDelete

 

 

2009-09-26 08:44:02     Re: DM9000A not found on U-Boot 2008.10

Wang Mengyin (CHINA)

Message: 80491   

 

If I delete this ,the driver can not reset the chip normally.

 

bfin> ping 10.21.11.65

ERROR: resetting DM9000 -> not responding

dm9000 not found at 0x20100000 id: 0x000a4690

ping failed; host 10.21.11.65 is not alive

TranslateQuoteReplyEditDelete

 

 

2009-09-26 08:47:47     Re: DM9000A not found on U-Boot 2008.10

Wang Mengyin (CHINA)

Message: 80492   

 

Please notice the ID. it's wrong.

 

Dose anybody successed in driving DM9000AEP on U-boot 2008.10?

TranslateQuoteReplyEditDelete

 

 

2009-09-26 09:34:48     Re: DM9000A not found on U-Boot 2008.10

Wang Mengyin (CHINA)

Message: 80493   

 

It seems the following statement generate the error message.

 

dm9000_reset(void){

 

.............

 

/* Check whether the ethernet controller is present */

if ((DM9000_ior(DM9000_PIDL) != 0x0) ||

     (DM9000_ior(DM9000_PIDH) != 0x90))

  printf("ERROR: resetting DM9000 -> not responding\n");

}

TranslateQuoteReplyEditDelete

 

 

2009-10-01 10:02:03     Re: DM9000A not found on U-Boot 2008.10

Kiril Petrov (BULGARIA)

Message: 80768   

 

Hi Wang,

 

last time I've receive this error: "... rx length too big..." with DM9000A in u-boot.1.1.6 , i've just add small delay 20uS before "Get status/length" command, and everythig worked just fine for me but YMMV . You can look at this thread : blackfin.uclinux.org/gf/project/u-boot/forum/

 

BR,

Attachments

    Outcomes