uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(76):DM9000网卡驱动

快乐虾

http://blog.csdn.net/lights_joy/

lights@hb165.com

本文适用于

ADSP-BF561

优视BF561EVB开发板

uclinux-2008r1.5-rc3(smp patch)

Visual DSP++ 5.0(update 5)

欢迎转载,但请保留作者信息

所用的开发板上带了一片DM9000的网络芯片,这个芯片的驱动在uclinux中自带了,所需要做的就是将它的资源添加到arch\blackfin\mach-bf561\boards\ezkit.c中。

首先添加资源定义:

static struct resource dm9000_bfin_resources[] = {

{

.start = 0x2C000000,

.end = 0x2C000000 + 0x7F,

.flags = IORESOURCE_MEM,

}, {

.start = IRQ_PF10,

.end = IRQ_PF10,

.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,

},

};

static struct platform_device dm9000_bfin_device = {

.name = "dm9000",

.id = -1,

.num_resources = ARRAY_SIZE(dm9000_bfin_resources),

.resource = dm9000_bfin_resources,

};

然后修改ezkit_devices的定义:

static struct platform_device *ezkit_devices[] __initdata = {

…………………………………..

&dm9000_bfin_device,

…………………………………..

};

在工程中加上net目录下的相关文件,编译运行,在启动信息中多了以下几行:

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: 2048 (order: 2, 24576 bytes)

TCP bind hash table entries: 2048 (order: 2, 16384 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

dm9000 Ethernet Driver

eth0: dm9000 at 2c000000,2c000004 IRQ 83 MAC: 02:80:ad:20:31:e8

Serial: Blackfin serial driver

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

NET: Registered protocol family 17

NET: Registered protocol family 1

1 参考资料

uclinux-2008R1.5-RC3(bf561)VDSP5的移植(72):中断时SP的保存(2009-2-22)

uclinux-2008R1.5-RC3(bf561)VDSP5的移植(73).init.setup(2009-02-27)

uclinux-2008R1.5-RC3(bf561)VDSP5的移植(74)initramfs(2009-02-27)

uclinux-2008R1.5-RC3(bf561)VDSP5的移植(75)Milestone:内核成功启动(2009-02-27)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值