s5pc100开发板网卡驱动的移植
相关软件下载地址:http://pan.baidu.com/s/16yo8Y
fsc100开发板
交叉编译工具:arm-cortex_a8-linux-gnueabi-gcc
vim arch/arm/mach-s5pc100/mach-smdkc100.c
#if defined (CONFIG_DM9000)
#include <linux/dm9000.h>
#include <linux/irq.h>
#endif
/* DM9000 Support */
#if defined(CONFIG_DM9000)
static struct resource dm9000_resources[] = {
[0] = {
.start= 0x88000000,
.end= 0x88000000 + 0x3,
.flags= IORESOURCE_MEM,
},
[1] = {
.start= 0x88000000 + 0x4,
.end= 0x88000000 + 0x4 +0x3,
.flags= IORESOURCE_MEM,
},
[2] = {
.start = IRQ_EINT(10),
.end = IRQ_EINT(10),
.flags= IORESOURCE_IRQ | IRQ_TYPE_LEVEL_HIGH,
},
};
static struct dm9000_plat_data s5pc100_dm9000_platdata = {
.flags= DM9000_PLATF_16BITONLY,
.dev_addr[0] = 0x00,
.dev_addr[1] = 0x00,
.dev_addr[2] = 0x3e,
.dev_addr[3] = 0x26,
.dev_addr[4] = 0x0a,
.dev_addr[5] = 0x00,
};
static struct platform_device s5pc100_device_dm9000 = {
.name= "dm9000",
.id= -1,
.num_resources= ARRAY_SIZE(dm9000_resources),
.resource= dm9000_resources,
.dev = {
.platform_data = & s5pc100_dm9000_platdata,
}
};
#endif
在smdkc100_devices[]结构体数组中添加如下内容:
#if defined(CONFIG_DM9000)
&s5pc100_device_dm9000,
#endif
$ make menuconfig
[*] Networking support (NEW) --->
Networking options --->
<*> Packet socket
<*> Unix domain sockets
[*] TCP/IP networking
[*] IP: multicasting
[*] IP: kernel level autoconfiguration
[*] IP: BOOTP support
Device Drivers --->
[*] Network device support --->
[*] Ethernet (10 or 100Mbit) --->
<*> DM9000 support
File systems --->
[*] Network File Systems --->
<*> NFS client suppor
[*] NFS client support for NFS version 3
[*] NFS client support for the NFSv3 ACL protocol extension
[*] Root file system on NFS
$ make zImage
$ cp arch/arm/boot/zImage /tftpboot