DSP

uclinux-2008R1-RC8(bf561)到VDSP5的移植(63): 网卡驱动

2019-07-13 17:34发布

  快乐虾 http://blog.csdn.net/lights_joy/ lights@hb165.com    本文适用于 ADI bf561 DSP 优视BF561EVB开发板 uclinux-2008r1-rc8 (移植到vdsp5) Visual DSP++ 5.0    欢迎转载,但请保留作者信息 所用的开发板上带了一片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, 16384 bytes) TCP bind hash table entries: 2048 (order: 1, 8192 bytes) TCP: Hash tables configured (established 2048 bind 2048) TCP reno registered dm9000 Ethernet Driver eth%d: Invalid ethernet MAC address.  Please set using ifconfig eth0: dm9000 at 2c000000,2c000004 IRQ 83 MAC: 00:00:00:00:00:00 不过还不是很清楚为什么MAC地址会全部为0。需要再研究一下。  

参考文章

uclinux-2008R1-RC8(bf561)VDSP5的移植(1):前言(2008/4/29) uclinux-2008R1-RC8(bf561)VDSP5的移植(2):代码注释(2008/4/29) uclinux-2008R1-RC8(bf561)VDSP5的移植(3):Head.s(2008/4/29)  uclinux-2008R1-RC8(bf561)VDSP5的移植(4):使用head.s做为入口点(2008/4/29) uclinux-2008R1-RC8(bf561)VDSP5的移植(5):CONFIG_BANK_x(2008/4/29) uclinux-2008R1-RC8(bf561)VDSP5的移植(6):__bss_start(2008/4/29) uclinux-2008R1-RC8(bf561)VDSP5的移植(7):_sdata(2008/4/30) uclinux-2008R1-RC8(bf561)VDSP5的移植(8):_stext(2008/4/30) uclinux-2008R1-RC8(bf561)VDSP5的移植(9):bf53x_relocate_l1_mem(2008/4/30) uclinux-2008R1-RC8(bf561)VDSP5的移植(10):编译器配置(2008/5/3) uclinux-2008R1-RC8(bf561)VDSP5的移植(11):cmdline_init(2008/5/4) uclinux-2008R1-RC8(bf561)VDSP5的移植(12):init_thread_union(2008/5/4) uclinux-2008R1-RC8(bf561)VDSP5的移植(13):未命名union的问题(2008/5/4) uclinux-2008R1-RC8(bf561)VDSP5的移植(14):segment(2008/5/4) uclinux-2008R1-RC8(bf561)VDSP5的移植(15):WARN()(2008/5/4) uclinux-2008R1-RC8(bf561)VDSP5的移植(16)start_kernel(2008/5/4) uclinux-2008R1-RC8(bf561)VDSP5的移植(17).l1.text(2008/5/4) uclinux-2008R1-RC8(bf561)VDSP5的移植(18).init.text.init.data(2008/5/4) uclinux-2008R1-RC8(bf561)VDSP5的移植(19)li2040(2008/5/5) uclinux-2008R1-RC8(bf561)VDSP5的移植(20):远调用(2008/5/5) uclinux-2008R1-RC8(bf561)VDSP5的移植(21)_mc_data_initialise(2008/5/5) uclinux-2008R1-RC8(bf561)VDSP5的移植(22)spinlock_types.h(2008/5/5) uclinux-2008R1-RC8(bf561)VDSP5的移植(23)spinlock.h(2008/5/5) uclinux-2008R1-RC8(bf561)VDSP5的移植(24)CONFIG_NR_CPUS(2008/5/5) uclinux-2008R1-RC8(bf561)VDSP5的移植(25)smp.h(2008/5/5) uclinux-2008R1-RC8(bf561)VDSP5的移植(26)smp_processor_id(2008/5/5) uclinux-2008R1-RC8(bf561)VDSP5的移植(27)cpumask_t(2008/5/6) uclinux-2008R1-RC8(bf561)VDSP5的移植(28)likely(2008/5/6) uclinux-2008R1-RC8(bf561)VDSP5的移植(29)spinlock(2008/5/6) uclinux-2008R1-RC8(bf561)VDSP5的移植(30)atomic_t(2008/5/8) __builtin_constant_p(2008/5/8) uclinux-2008R1-RC8(bf561)VDSP5的移植(32)cdefbf561.h(2008/5/8) uclinux-2008R1-RC8(bf561)VDSP5的移植(33)__ebss_l1(2008/5/14) uclinux-2008R1-RC8(bf561)VDSP5的移植(34).rept(2008/5/14) uclinux-2008R1-RC8(bf561)VDSP5的移植(35)ARRAY_SIZE(2008/5/15) uclinux-2008R1-RC8(bf561)VDSP5的移植(36)__per_cpu_start(2008/5/19) uclinux-2008R1-RC8(bf561)VDSP5的移植(37)_cplb_mgr(2008/5/20) uclinux-2008R1-RC8(bf561)VDSP5的移植(38):cachespinlock(2008/5/21) uclinux-2008R1-RC8(bf561)VDSP5的移植(39):链接重排(2008/5/21) uclinux-2008R1-RC8(bf561)VDSP5的移植(40):中断优先级(2008/5/22) uclinux-2008R1-RC8(bf561)VDSP5的移植(41)PLL造成的困扰(2008/6/3) uclinux-2008R1-RC8(bf561)VDSP5的移植(42)__bad_size的问题(2008/6/20) uclinux-2008R1-RC8(bf561)VDSP5的移植(43)__builtin_return_address的问题(2008/6/23) uclinux-2008R1-RC8(bf561)VDSP5的移植(44)kmallockzalloc的问题(2008/6/23) uclinux-2008R1-RC8(bf561)VDSP5的移植(45)__delay(2008/6/24) uclinux-2008R1-RC8(bf561)VDSP5的移植(46): raw_rwlock_t(2008/6/25) uclinux-2008R1-RC8(bf561)VDSP5的移植(47): d_alloc引出的问题(2008/6/27) uclinux-2008R1-RC8(bf561)VDSP5的移植(48): __cmpxchg的问题(2008/6/30) uclinux-2008R1-RC8(bf561)VDSP5的移植(49)kernel_thread_helper的问题(2008/7/2) uclinux-2008R1-RC8(bf561)VDSP5的移植(50)jiffies_64的定义问题(2008/7/2) uclinux-2008R1-RC8(bf561)VDSP5的移植(51)fork.c编译失败(2008/7/3) uclinux-2008R1-RC8(bf561)VDSP5的移植(52)cache.s的问题(2008/7/7) uclinux-2008R1-RC8(bf561)VDSP5的移植(53)reboot.c的问题(2008/7/8) uclinux-2008R1-RC8(bf561)VDSP5的移植(54): initramfs的问题(2008/7/8) uclinux-2008R1-RC8(bf561)VDSP5的移植(55): filemap.c的问题(2008/7/9) uclinux-2008R1-RC8(bf561)VDSP5的移植(56): __grab_cache_page(2008/7/10) uclinux-2008R1-RC8(bf561)VDSP5的移植(57): _NSIG_WORDS_is_unsupported_size(2008/7/11) uclinux-2008R1-RC8(bf561)VDSP5的移植(58): unable to open an initial console(2008/7/17) uclinux-2008R1-RC8(bf561)VDSP5的移植(59): Milestone:内核成功启动(2008/7/18) uclinux-2008R1-RC8(bf561)VDSP5的移植(60): current_text_addr(2008/7/20) uclinux-2008R1-RC8(bf561)VDSP5的移植(61): KBUILD_MODNAME(2008/7/21) uclinux-2008R1-RC8(bf561)VDSP5的移植(62): Failed to open '#include' file 'bf561.h'(2008/7/21)