經過3天的努力, DM9000網卡的驅動終於能正常工作了。 由於對DM9000芯片瞭解不夠, 代碼修改的比較亂, 等代碼整理好之後再上傳, 和大家一起討論。
開發板的根文件系統掛載NFS, 能正常啓動說明網卡能正常工作:
U-Boot 2012.07 (Aug 30 2012 - 21:55:43)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++ Welcome to my u-boot +++
+++ Liyong-zou +++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
CPUID: 32440001
FCLK: 400 MHz
HCLK: 100 MHz
PCLK: 50 MHz
DRAM: 64 MiB
WARNING: Caches not enabled
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Net: dm9000
Hit any key to stop autoboot: 0
MINI2440 # boot
dm9000 i/o: 0x20000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 00:01:02:03:04:05
could not establish link
Using dm9000 device
File transfer via NFS from server 192.168.1.30; our IP address is 192.168.1.20
Filename '/nfsboot/uImage'.
Load address: 0x30008000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#####################T T T T T T T *** ERROR: Cannot umount
## Booting kernel from Legacy Image at 30008000 ...
Image Name: Linux-2.6.34.7
Created: 2013-06-18 13:39:32 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2102688 Bytes = 2 MiB
Load Address: 30008000
Entry Point: 30008040
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Linux version 2.6.34.7 (liyong-zou-book@liyong-zou) (gcc version 4.4.3 (ctng-1.6.1) ) #39 Tue Jun 18 21:39:20 CST 2013
[ 0.000000] CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=00007177
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine: MINI2440
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] CPU S3C2440A (id 0x32440001)
[ 0.000000] S3C24XX Clocks, Copyright 2004 Simtec Electronics
[ 0.000000] S3C244X: core 400.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
[ 0.000000] CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: noinitrd root=/dev/nfs nfsroot=192.168.1.30:/nfsboot/rootfs,tcp ip=192.168.1.20:192.168.1.30:192.168.1.1:255.255.255.0::eth0:off console=ttySAC0,115200
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 64MB = 64MB total
[ 0.000000] Memory: 60644k/60644k available, 4892k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
[ 0.000000] vmalloc : 0xc4800000 - 0xe0000000 ( 440 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .init : 0xc0008000 - 0xc002a000 ( 136 kB)
[ 0.000000] .text : 0xc002a000 - 0xc03bb000 (3652 kB)
[ 0.000000] .data : 0xc03d2000 - 0xc03fb480 ( 166 kB)
[ 0.000000] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] NR_IRQS:85
[ 0.000000] irq: clearing subpending status 00000003
[ 0.000000] irq: clearing subpending status 00000002
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] console [ttySAC0] enabled
[ 0.015000] Calibrating delay loop... 49.66 BogoMIPS (lpj=124160)
[ 0.105000] Mount-cache hash table entries: 512
[ 0.105000] CPU: Testing write buffer coherency: ok
[ 0.125000] NET: Registered protocol family 16
[ 0.165000] MINI2440: Option string mini2440=0tb
[ 0.165000] MINI2440: 't' ignored, touchscreen not compiled in
[ 0.170000] MINI2440: LCD [0:240x320] 1:800x480 2:1024x768
[ 0.205000] S3C2440: Initialising architecture
[ 0.205000] S3C2440: IRQ Support
[ 0.210000] S3C24XX DMA Driver, Copyright 2003-2006 Simtec Electronics
[ 0.215000] DMA channel 0 at c4808000, irq 33
[ 0.220000] DMA channel 1 at c4808040, irq 34
[ 0.225000] DMA channel 2 at c4808080, irq 35
[ 0.225000] DMA channel 3 at c48080c0, irq 36
[ 0.230000] S3C244X: Clock Support, DVS off
[ 0.380000] bio: create slab <bio-0> at 0
[ 0.390000] usbcore: registered new interface driver usbfs
[ 0.390000] usbcore: registered new interface driver hub
[ 0.395000] usbcore: registered new device driver usb
[ 0.405000] s3c-i2c s3c2440-i2c: slave address 0x10
[ 0.405000] s3c-i2c s3c2440-i2c: bus frequency set to 97 KHz
[ 0.415000] s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
[ 0.430000] Advanced Linux Sound Architecture Driver Version 1.0.22.1.
[ 0.455000] NET: Registered protocol family 2
[ 0.455000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.465000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.470000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.475000] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.480000] TCP reno registered
[ 0.485000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.490000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.500000] NET: Registered protocol family 1
[ 0.505000] RPC: Registered udp transport module.
[ 0.505000] RPC: Registered tcp transport module.
[ 0.510000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.705000] JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
[ 0.715000] ROMFS MTD (C) 2007 Red Hat, Inc.
[ 0.720000] msgmni has been set to 118
[ 0.740000] alg: No test for stdrng (krng)
[ 0.740000] io scheduler noop registered
[ 0.740000] io scheduler deadline registered
[ 0.750000] io scheduler cfq registered (default)
[ 0.795000] Console: switching to colour frame buffer device 60x53
[ 0.810000] fb0: s3c2410fb frame buffer device
[ 2.090000] s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
[ 2.095000] s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
[ 2.105000] s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
[ 2.220000] brd: module loaded
[ 2.225000] at24 0-0050: 1024 byte 24c08 EEPROM (writable)
[ 2.245000] S3C24XX NAND Driver, (c) 2004 Simtec Electronics
[ 2.245000] s3c24xx-nand s3c2440-nand: Tacls=1, 10ns Twrph0=3 30ns, Twrph1=2 20ns
[ 2.250000] s3c24xx-nand s3c2440-nand: NAND soft ECC
[ 2.255000] NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
[ 2.260000] Creating 4 MTD partitions on "NAND 256MiB 3,3V 8-bit":
[ 2.265000] 0x000000000000-0x000000040000 : "u-boot"
[ 2.280000] uncorrectable error :
[ 2.285000] 0x000000040000-0x000000060000 : "u-boot-env"
[ 2.300000] 0x000000060000-0x000000560000 : "kernel"
[ 2.310000] 0x000000560000-0x000010000000 : "root"
[ 2.370000] ftl_cs: FTL header not found.
[ 2.385000] lydm9k[lydm9k_init]: insert module lydm9k
[ 2.400000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 2.405000] s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
[ 2.405000] s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
[ 2.410000] s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
[ 2.480000] hub 1-0:1.0: USB hub found
[ 2.480000] hub 1-0:1.0: 2 ports detected
[ 2.490000] usbcore: registered new interface driver libusual
[ 2.500000] s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes
[ 2.515000] mice: PS/2 mouse device common for all mice
[ 2.520000] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ 2.530000] S3C24XX RTC, (c) 2004,2006 Simtec Electronics
[ 2.535000] s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
[ 2.540000] s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
[ 2.545000] i2c /dev entries driver
[ 2.640000] S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
[ 2.645000] s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
[ 2.645000] cpuidle: using governor ladder
[ 2.655000] sdhci: Secure Digital Host Controller Interface driver
[ 2.655000] sdhci: Copyright(c) Pierre Ossman
[ 2.665000] s3c-sdi s3c2440-sdi: powered down.
[ 2.665000] s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ
[ 2.760000] usbcore: registered new interface driver hiddev
[ 2.760000] usbcore: registered new interface driver usbhid
[ 2.765000] usbhid: USB HID core driver
[ 2.775000] No device for DAI UDA134X
[ 2.775000] No device for DAI s3c24xx-i2s
[ 2.780000] S3C24XX_UDA134X SoC Audio driver
[ 2.785000] UDA134X SoC Audio Codec
[ 2.795000] asoc: UDA134X <-> s3c24xx-i2s mapping ok
[ 2.815000] ALSA device list:
[ 2.815000] #0: S3C24XX_UDA134X (UDA134X)
[ 2.825000] TCP cubic registered
[ 2.825000] NET: Registered protocol family 17
[ 2.850000] s3c2410-rtc s3c2410-rtc: setting system clock to 2000-10-17 23:29:17 UTC (971825357)
[ 4.360000] IP-Config: Complete:
[ 4.360000] device=eth0, addr=192.168.1.20, mask=255.255.255.0, gw=192.168.1.1,
[ 4.365000] host=192.168.1.20, domain=, nis-domain=(none),
[ 4.370000] bootserver=192.168.1.30, rootserver=192.168.1.30, rootpath=
[ 4.380000] Looking up port of RPC 100003/2 on 192.168.1.30
[ 4.390000] Looking up port of RPC 100005/1 on 192.168.1.30
[ 73.210000] VFS: Mounted root (nfs filesystem) on device 0:13.
[ 73.210000] Freeing init memory: 136K
profile is empty!!!
/ #
/ #