2010-04-19 21:52:45     uboot 1.1.6, ethernet is not working well

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

2010-04-19 21:52:45     uboot 1.1.6, ethernet is not working well

鹏 肖 (CHINA)

Message: 88600   

 

I use the BF561_EZKIT,after  booting  uboot and it  display as  the next:  And  the led of RJ45  is not lighted.

 

CPU:   ADSP bf561-0.3 (Detected Rev: 0.5)

Board: EFLAG ebf561 board

       Support: *******************

Clock: VCO: 540 MHz, Core: 540 MHz, System: 90 MHz

RAM:   64 MB

Flash:  8 MB

In:    serial

Out:   serial

Err:   serial

Net:   CS8900 at 0x2D400300

MAC:   00:FE:DF:35:48:19

Hit any key to stop autoboot:  0

bfin> tftp 1000000 xxx

TFTP from server 192.168.0.7; our IP address is 192.168.0.55

Filename 'xxx'.

Load address: 0x1000000

Loading: T  T  T  T

 

And I  print the message from the uboot:

 

bfin> printenv

bootargs=root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600

bootcmd=run flashboot

bootdelay=5

baudrate=57600

loads_echo=1

ethaddr=00:fe:df:35:48:19

ipaddr=192.168.0.55

serverip=192.168.0.7

autoload=no

gatewayip=192.168.0.1

netmask=255.255.255.0

hostname=Eflag_LDS561

loadaddr=0x1000000

ubootfile=u-boot.bin

update=tftp $(loadaddr) $(ubootfile);protect off 0x20000000 0x2003FFFF;erase 0x20000000 0x2003FFFF;cp.b $(loadaddr) 0x20000000 $(filesize)

addip=set bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):eth0:off:$(ethaddr)

ramargs=set bootargs root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600

ramboot=tftp $(loadaddr) uImage;run ramargs;run addip;bootm

nfsargs=set bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3

nfsboot=tftp $(loadaddr) vmImage;run nfsargs;run addip;bootm

flashboot=bootm 0x20100000

stdin=serial

stdout=serial

stderr=serial

 

Environment size: 909/131068 bytes

 

And Kanwar Saad has  said:

 

1. Your PC is not configured as a tftp server. for setting up a tftp server use the following link.

 

http://docs.blackfin.uclinux.org/doku.php?id=setting_up_a_tftp_server

 

2. The ip address of the server is not correct. In your case your pc should have ip address of 192.168.0.7

 

3. The image file you are getting (xxx) should be present in /tftpboot folder. make sure the filename and extension are correct.

 

I have  checked. It is  still  working .So I  open  the  cs8900.c  debug.

 

bfin> tftp 1000000 2008

TFTP from server 192.168.0.7; our IP address is 192.168.0.55

Filename '2008'.

Load address: 0x1000000

Loading: *

transmission error 0x0

cs(0x18): unable to send packet; retrying...

 

transmission error 0x0

T cs(0x18): unable to send packet; retrying...

 

transmission error 0x0

cs(0x18): unable to send packet; retrying...

 

And the cs8900.c  of  uboot 1.1.6  concerned with above is that:

 

extern int eth_send (volatile void *packet, int length)

{

volatile unsigned short *addr;

int tmo;

unsigned short s;

 

retry:

/* initiate a transmit sequence */

CS8900_TxCMD = PP_TxCmd_TxStart_Full;

asm("ssync;");

asm("nop;");

asm("nop;");

CS8900_TxLEN = length;

asm("ssync;");

asm("nop;");

asm("nop;");

 

/* Test to see if the chip has allocated memory for the packet */

if ((get_reg (PP_BusSTAT) & PP_BusSTAT_TxRDY) == 0) {

  /* Oops... this should not happen! */

#ifdef DEBUG

  printf ("cs(0x%x): unable to send packet; retrying...\n",get_reg (PP_BusSTAT));

#endif

  for (tmo = get_timer (0) + 5 * CFG_HZ; get_timer (0) < tmo;)

   /*NOP*/;

  eth_reset ();

  eth_reginit ();

  goto retry;

}

 

/* Write the contents of the packet */

/* assume even number of bytes */

for (addr = packet; length > 0; length -= 2)

  CS8900_RTDATA = *addr++;

 

/* wait for transfer to succeed */

tmo = get_timer (0) + 5 * CFG_HZ;

while ((s = get_reg (PP_TER) & ~0x1F) == 0) {

  if (get_timer (0) >= tmo)

   break;

}

 

/* nothing */ ;

if ((s & (PP_TER_CRS | PP_TER_TxOK)) != PP_TER_TxOK) {

#ifdef DEBUG

  printf ("\ntransmission error %#x\n", s);

#endif

}

 

return 0;

}

 

 

 

I  am  really  confused with  the next  working,how  to solve it?

QuoteReplyEditDelete

 

 

2010-04-19 21:59:48     Re: uboot 1.1.6, ethernet is not working well

Mike Frysinger (UNITED STATES)

Message: 88601   

 

u-boot 1.1.6 is pretty old.  further, we dont have any boards using the cs8900 part, so you'll have to debug it yourself.

 

you might want to check your async timings and slow down that bank.

Attachments

    Outcomes