快乐虾
http://blog.csdn.net/lights_joy/
lights@hb165.com
本文适用于
ADSP-BF561
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)