2009-07-26 22:15:17     DM9000 on ez-kit bf533 does not work!!!

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

2009-07-26 22:15:17     DM9000 on ez-kit bf533 does not work!!!

Chunbo Fan (CHINA)

Message: 78049   

 

hi:

 

      The defalt network adapter driver of the uclinux-dist-2009R1-RC1 is SMC91X.

 

but  the network adapter on my target board is DM9000.so I add code like this:

 

/**************linux2.6.x/arch/blackfin/mach-bf533/board/ezkit.c****************/

 

/*#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)

static struct resource smc91x_resources[] = {

    {

        .name = "smc91x-regs",

        .start = 0x20310300,

        .end = 0x20310300 + 16,

        .flags = IORESOURCE_MEM,

    }, {

        .start = IRQ_PF5,

        .end = IRQ_PF5,

        .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,

    },

};

static struct platform_device smc91x_device = {

    .name = "smc91x",

    .id = 0,

    .num_resources = ARRAY_SIZE(smc91x_resources),

    .resource = smc91x_resources,

};

#endif*/

 

#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)

static struct resource dm9000_resources[] = {

    [0] = {

        .start = 0x20320000,

        .end = 0x20320000 + 1,

        .flags = IORESOURCE_MEM,

    },

    [1] = {

        .start = 0x20320000+2,

        .end = 0x20320000 + 3,

        .flags = IORESOURCE_MEM,

    },

    [2] = {

        .start = IRQ_PF5,

        .end = IRQ_PF5,

        .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,

    },

};

 

static struct dm9000_plat_data bf533_dm9k_platdata = {

    .flags = DM9000_PLATF_16BITONLY,

};

 

static struct platform_device dm9000_device = {

    .name = "dm9000",

    .id = 0,

    .num_resources = ARRAY_SIZE(dm9000_resources),

    .resource = dm9000_resources,

    .dev = {

        .platform_data = &bf533_dm9k_platdata,

    }

};

#endif

 

 

 

 

 

/*#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)

    &smc91x_device,

#endif*/

 

#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)

    &dm9000_device,

#endif

 

 

 

/******************linux2.6.x/driver/net/dm9000.h***********/

 

//#define DM9000_ID        0x90000A46

#define DM9000_ID        0x2b2a2928

 

 

 

/*****************linux2.6.x/driver/net/dm9000.c***********/

 

and I add "asm("ssync;")" after every functiong of readb,readw,readl,writeb,writew,writel,readsb,writesb and so on.

 

 

 

I download the uImage file to my target board by the ethernet. and it run like this:

 

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

DM9000: running in 16 bit mode                                                 

MAC: 08:00:3e:26:0a:5b                                                         

TFTP from server 192.168.0.2; our IP address is 192.168.0.15                   

 

Filename 'uImage'.                                                             

 

Load address: 0x1000000                                                        

 

Loading: T T T T ###############################################################

 

         #################################################################     

 

         #################################################################     

 

         #################################################################     

 

         #################################################################     

 

         #################################################################     

 

         #################################################################     

 

         #################################################################     

 

         #################################################################     

 

         ################################################################      

 

done                                                                           

 

Bytes transferred = 3319529 (32a6e9 hex)                                       

 

## Booting kernel from Legacy Image at 01000000 ...                            

 

   Image Name:   Linux-2.6.28.10-ADI-2009R1                                    

 

   Created:      2009-07-24  18:41:49 UTC                                      

 

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)                 

 

   Data Size:    3319465 Bytes =  3.2 MB                                       

 

   Load Address: 00001000                                                      

 

   Entry Point:  00188f8c                                                      

 

   Verifying Checksum ... OK                                                   

 

   Uncompressing Kernel Image ... OK                                           

 

Starting Kernel at = 00188f8c                                                  

 

Linux version 2.6.28.10-ADI-2009R1 (vs@vs-laptop) (gcc version 4.1.2 (ADI svn))9

 

console [early_BFuart0] enabled                                                

 

early printk enabled on early_BFuart0                                          

 

Warning: limiting memory to 31MB due to hardware anomaly 05000263              

 

Board Memory: 32MB                                                             

 

Kernel Managed Memory: 32MB                                                    

 

Memory map:                                                                    

 

  fixedcode = 0x00000400-0x00000490                                            

 

  text      = 0x00001000-0x001155c0                                            

 

  rodata    = 0x001155c0-0x001615f8                                            

 

  bss       = 0x00162000-0x0016fd6c                                            

 

  data      = 0x0016fd80-0x0017e000                                            

 

    stack   = 0x0017c000-0x0017e000                                            

 

  init      = 0x0017e000-0x00628000                                            

 

  available = 0x00628000-0x01eff000                                            

 

  DMA Zone  = 0x01f00000-0x02000000                                            

 

Hardware Trace Active and Enabled                                              

 

Boot Mode: 0                                                                   

 

Blackfin support (C) 2004-2009 Analog Devices, Inc.                            

 

Compiled for ADSP-BF532 Rev 0.4                                                

 

Blackfin Linux support by   blackfin.uclinux.org/                         

 

Processor Speed: 594 MHz core clock and 118 MHz System Clock                   

 

NOMPU: setting up cplb tables                                                  

 

Instruction Cache Enabled for CPU0                                             

 

Data Cache Enabled for CPU0 (write-back)                                       

 

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 7873     

 

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=27000000 earlyprintk=seriaf

 

Configuring Blackfin Priority Driven Interrupts                                

 

PID hash table entries: 128 (order: 7, 512 bytes)                              

 

console handover: boot [early_BFuart0] -> real [ttyBF0]                        

 

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)                  

 

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)                    

 

Memory available: 25148k/32768k RAM, (4776k init code, 1105k kernel code, 419k )

 

Calibrating delay loop... 1183.74 BogoMIPS (lpj=2367488)                       

 

Security Framework initialized                                                 

 

Mount-cache hash table entries: 512                                            

 

Blackfin Scratchpad data SRAM: 4 KB                                            

 

Blackfin L1 Instruction SRAM: 32 KB (20 KB free)                               

 

net_namespace: 288 bytes                                                       

 

NET: Registered protocol family 16                                             

 

Blackfin DMA Controller                                                        

 

ezkit_init(): registering device resources                                     

 

NET: Registered protocol family 2                                              

 

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)                 

 

TCP established hash table entries: 1024 (order: 1, 8192 bytes)                

 

TCP bind hash table entries: 1024 (order: 0, 4096 bytes)                       

 

TCP: Hash tables configured (established 1024 bind 1024)                       

 

TCP reno registered                                                            

 

NET: Registered protocol family 1                                              

 

JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.                            

 

msgmni has been set to 49                                                      

 

io scheduler noop registered                                                   

 

io scheduler anticipatory registered (default)                                 

 

io scheduler cfq registered                                                    

 

Serial: Blackfin serial driver                                                 

 

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 21) is a BFIN-UART               

 

brd: module loaded                                                             

 

dm9000 Ethernet Driver, V1.31                                                  

eth0: dm9000e at 20320000,20320002 IRQ 38 MAC: 10:11:12:13:14:15 (chip)        

 

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_5

 

bfin-wdt: initialized: timeout=20 sec (nowayout=0)                             

 

TCP cubic registered                                                           

 

Initializing XFRM netlink socket                                               

 

NET: Registered protocol family 17                                             

 

eth0: link up, 10Mbps, half-duplex, lpa 0x0E0D                                 

IP-Config: Complete:                                                           

     device=eth0, addr=192.168.0.15, mask=255.255.255.0, gw=192.168.0.1,       

     host=bf533-ezkit, domain=, nis-domain=(none),                             

     bootserver=192.168.0.2, rootserver=192.168.0.2, rootpath=                 

 

Freeing unused kernel memory: 4776k freed                                      

 

dma_alloc_init: dma_page @ 0x01a2a000 - 256 pages at 0x01f00000                

 

                           _____________________________________               

 

        a8888b.           / Welcome to the uClinux distribution \              

 

       d888888b.         /       _     _                         \             

 

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |            

 

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |            

 

       8'    .88       \        | |   | |  _ \| | | | \  /        |            

 

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |            

 

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |            

 

     dP   .    Y8b.       \   For embedded processors including   |            

 

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /             

 

   d8"         'Y88b        \___________________________________/              

 

  :8P    '      :888                                                           

 

   8a.   :     _a88P         For further information, check out:               

 

._/"Yaa_:   .| 88P|            -   blackfin.uclinux.org/                 

 

\    YP"    `| 8P  `.          -   docs.blackfin.uclinux.org/            

 

/     \.___.d|    .'           -   www.uclinux.org/                      

 

`--..__)8888P`._.'  jgs/a:f    -   www.analog.com/blackfin               

 

                                                                               

 

Have a lot of fun...                                                           

 

                                                                               

 

                                                                               

 

BusyBox v1.13.4 (2009-07-25 01:43:41 CST) built-in shell (msh)                 

 

Enter 'help' for a list of built-in commands.                                  

 

                                                                               

 

root:/> ifconfig                                                               

 

eth0      Link encap:Ethernet  HWaddr 10:11:12:13:14:15                        

 

          inet addr:192.168.0.15  Bcast:192.168.0.255  Mask:255.255.255.0      

 

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                   

 

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0                   

 

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                 

 

          collisions:0 txqueuelen:1000                                         

 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                               

 

          Interrupt:38                                                         

 

                                                                               

 

lo        Link encap:Local Loopback                                            

 

          inet addr:127.0.0.1  Mask:255.0.0.0                                  

 

          UP LOOPBACK RUNNING  MTU:16436  Metric:1                             

 

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0                   

 

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                 

 

          collisions:0 txqueuelen:0                                            

 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                               

 

                                                                               

 

root:/> ping -c 5 192.168.0.2                                                  

 

PING 192.168.0.2 (192.168.0.2): 56 data bytes                                  

 

                                                                               

 

--- 192.168.0.2 ping statistics ---                                            

 

5 packets transmitted, 0 packets received, 100% packet loss

 

 

 

the problem is: when I ping my host ip 192.168.0.2,I received 0 packet. why????

TranslateQuoteReplyEditDelete

 

 

2009-07-26 22:31:29     Re: DM9000 on ez-kit bf533 does not work!!!

Qi Qiu (CHINA)

Message: 78050   

 

这个我做过,你可以加我QQ:25273943,或者Email: qiuqi830@gmail.com

QuoteReplyEditDelete

 

 

2009-07-26 22:45:47     Re: DM9000 on ez-kit bf533 does not work!!!

Chunbo Fan (CHINA)

Message: 78051   

 

这个我做过,你可以加我QQ:25273943,或者Email: qiuqi830@gmail.com

 

---

 

 

 

原来你也是四川的阿!!呵呵,在这个网站上还得用英文发,有点麻烦!加你QQ失败了,给你发了邮件的。

 

我的QQ是262869974

TranslateQuoteReplyEditDelete

 

 

2009-07-26 22:49:35     Re: DM9000 on ez-kit bf533 does not work!!!

Robin Getz (UNITED STATES)

Message: 78052   

 

Chunbo:

 

It could be lots of reasons. Does ping work from U-Boot?

 

Have a look at these boards - people are using the DM9000 on them.

 

mach-bf527/boards/cm_bf527.c

mach-bf533/boards/H8606.c

mach-bf533/boards/ip0x.c

QuoteReplyEditDelete

 

 

2009-07-26 22:59:42     Re: DM9000 on ez-kit bf533 does not work!!!

Chunbo Fan (CHINA)

Message: 78053   

 

Chunbo:

 

It could be lots of reasons. Does ping work from U-Boot?

 

Have a look at these boards - people are using the DM9000 on them.

 

mach-bf527/boards/cm_bf527.c

mach-bf533/boards/H8606.c

mach-bf533/boards/ip0x.c

 

---

 

 

 

yes , it  works normally from U-BOOT!!

TranslateQuoteReplyEditDelete

 

 

2009-07-26 23:01:02     Re: DM9000 on ez-kit bf533 does not work!!!

Chunbo Fan (CHINA)

Message: 78054   

 

Chunbo:

 

It could be lots of reasons. Does ping work from U-Boot?

 

Have a look at these boards - people are using the DM9000 on them.

 

mach-bf527/boards/cm_bf527.c

mach-bf533/boards/H8606.c

mach-bf533/boards/ip0x.c

 

---

 

now I try it!!

TranslateQuoteReplyEditDelete

 

 

2009-07-26 23:18:01     Re: DM9000 on ez-kit bf533 does not work!!!

Mike Frysinger (UNITED STATES)

Message: 78055   

 

verify your irq is wired correrctly.  u-boot does not use the irq line.

Attachments

    Outcomes