NANO2410 CS8900 debugging

news/2024/11/16 18:51:21/

1. 内核启动过程中CS8900驱动始终没有加载

最终发现跟device注册有关,修改mach_smdk2410.c文件如下:

/* CS8900 */static struct resource s3c_cs89x0_resources[] = {[0] = DEFINE_RES_MEM(0x19000000, SZ_1M),[1] = DEFINE_RES_IRQ(IRQ_EINT9),
};static struct platform_device s3c2410_cs89x0 = {.name		= "cirrus,cs8900",.id		= -1,.num_resources	= ARRAY_SIZE(s3c_cs89x0_resources),.resource	= s3c_cs89x0_resources,
};static struct platform_device *smdk2410_devices[] __initdata = {&s3c_device_ohci,&s3c_device_lcd,&s3c_device_wdt,&s3c_device_i2c0,&s3c_device_iis,&s3c2410_cs89x0,&s3c_device_usbgadget,&s3c_device_usb_hsudc,&s3c_device_sdi,	
};

然后CS8900driver能够正常启动并检测到设备。

2. 当设置eth0时,kernel crash

root@nano2410# ifconfig eth0 hw ether 48:02:AA:BB:CC:DD
root@nano2410#ifconfig eth0 up
irq 57: nobody cared (try booting with the "irqpoll" option)
CPU: 0 PID: 70 Comm: ifconfig Not tainted 5.3.0-g15fb8d921-dirty #39
Hardware name: SMDK2410
Backtrace:
[<c000df10>] (dump_backtrace) from [<c000e1f8>] (show_stack+0x18/0x24)r7:00000001 r6:00000039 r5:00000000 r4:c06f80c4
[<c000e1e0>] (show_stack) from [<c055db74>] (dump_stack+0x20/0x30)
[<c055db54>] (dump_stack) from [<c00562dc>] (__report_bad_irq+0x2c/0xd0)
[<c00562b0>] (__report_bad_irq) from [<c005663c>] (note_interrupt+0x248/0x2ac)r9:c06ff1f0 r8:c06f6934 r7:00000001 r6:00000039 r5:00000000 r4:c06f80c4
[<c00563f4>] (note_interrupt) from [<c0053408>] (handle_irq_event_percpu+0x58/0x84)r10:00000000 r9:c06ff1f0 r8:c06f6934 r7:00000001 r6:c06f80c4 r5:00000000r4:c06e7008 r3:00000000
[<c00533b0>] (handle_irq_event_percpu) from [<c0053464>] (handle_irq_event+0x30/0x4c)r6:0000ffff r5:c1802400 r4:c06f80c4
[<c0053434>] (handle_irq_event) from [<c0057450>] (handle_edge_irq+0xe0/0x1d0)r5:c1802400 r4:c06f80c4
[<c0057370>] (handle_edge_irq) from [<c005282c>] (generic_handle_irq+0x34/0x50)r5:c1802400 r4:00000000
[<c00527f8>] (generic_handle_irq) from [<c0286f74>] (s3c_irq_demux+0xd4/0x160)
[<c0286ea0>] (s3c_irq_demux) from [<c0052b3c>] (__handle_domain_irq+0x74/0xe8)r10:60000013 r9:c1206000 r8:c1808000 r7:00000001 r6:c1207c08 r5:c0715020r4:000001b9 r3:c0286ea0
[<c0052ac8>] (__handle_domain_irq) from [<c0286bf4>] (s3c24xx_handle_irq+0xbc/0x174)r9:c1206000 r8:c1808000 r7:c05bce90 r6:0000ffff r5:c1207b18 r4:c073da90
[<c0286b38>] (s3c24xx_handle_irq) from [<c0009a5c>] (__irq_svc+0x5c/0x78)
Exception stack(0xc1207b18 to 0xc1207b60)
7b00:                                                       00400100 000040a1
7b20: c0715640 60000013 00000000 00000002 00000000 00000001 c1808000 c1206000
7b40: 60000013 c1207bac c1207bb0 c1207b68 c001d670 c000a0fc 60000013 ffffffffr7:c1207b4c r6:ffffffff r5:60000013 r4:c000a0fc
[<c000a088>] (__do_softirq) from [<c001d670>] (irq_exit+0x98/0xac)r10:60000013 r9:c1206000 r8:c1808000 r7:00000001 r6:00000000 r5:c0715020r4:00000000
[<c001d5d8>] (irq_exit) from [<c0052b44>] (__handle_domain_irq+0x7c/0xe8)
[<c0052ac8>] (__handle_domain_irq) from [<c0286bf4>] (s3c24xx_handle_irq+0xbc/0x174)r9:c1206000 r8:00000039 r7:c05bce90 r6:0000ffff r5:c1207c08 r4:c073da90
[<c0286b38>] (s3c24xx_handle_irq) from [<c0009a5c>] (__irq_svc+0x5c/0x78)
Exception stack(0xc1207c08 to 0xc1207c50)
7c00:                   c06f80c4 00000000 00000000 00000000 c06f80c4 c1058600
7c20: 00000000 c06e7008 00000039 c06f8150 60000013 c1207c9c c1207c58 c1207c58
7c40: c0055368 c0055014 60000013 ffffffffr7:c1207c3c r6:ffffffff r5:60000013 r4:c0055014
[<c0054cb8>] (__setup_irq) from [<c00556a8>] (request_threaded_irq+0xd4/0x168)r10:c06f80d4 r9:00000000 r8:00000039 r7:00000000 r6:00000000 r5:c06f80c4r4:c1058600
[<c00555d4>] (request_threaded_irq) from [<c0376fc4>] (net_open+0x84/0x55c)r10:00000000 r9:00000001 r8:00000000 r7:00000000 r6:c05ad444 r5:c06e7008r4:c1007000 r3:00000000
[<c0376f40>] (net_open) from [<c04787f8>] (__dev_open+0xf4/0x180)r6:c05ad444 r5:c06e7008 r4:c1007000
[<c0478704>] (__dev_open) from [<c0478c04>] (__dev_change_flags+0x16c/0x1d4)r7:00001002 r6:00001043 r5:c06e7008 r4:c1007000
[<c0478a98>] (__dev_change_flags) from [<c0478c8c>] (dev_change_flags+0x20/0x58)r9:c1206000 r8:c1a9780c r7:00001002 r6:c1007134 r5:00000000 r4:c1007000
[<c0478c6c>] (dev_change_flags) from [<c04fc944>] (devinet_ioctl+0x618/0x768)r9:c1206000 r8:c1a9780c r7:c06e7008 r6:00000000 r5:c101f3c0 r4:c1207e00
[<c04fc32c>] (devinet_ioctl) from [<c04fecf4>] (inet_ioctl+0x1f0/0x36c)r10:00000000 r9:c1206000 r8:00000051 r7:c0710b98 r6:00008914 r5:c06e7008r4:becdcc68
[<c04feb04>] (inet_ioctl) from [<c0452578>] (sock_ioctl+0x398/0x584)r9:c1206000 r8:c0710b98 r7:c1871e80 r6:becdcc68 r5:c06e7008 r4:00008914
[<c04521e0>] (sock_ioctl) from [<c00e82a0>] (do_vfs_ioctl+0xa8/0x8b4)r9:c1206000 r8:00000003 r7:c1871e80 r6:c141da30 r5:becdcc68 r4:c06e7008
[<c00e81f8>] (do_vfs_ioctl) from [<c00e8ae8>] (ksys_ioctl+0x3c/0x64)r10:00000000 r9:c1206000 r8:becdcc68 r7:00008914 r6:00000003 r5:c1871e80r4:c1871e80
[<c00e8aac>] (ksys_ioctl) from [<c00e8b20>] (sys_ioctl+0x10/0x1c)r9:c1206000 r8:c00091e4 r7:00000036 r6:becdcc68 r5:becdce5c r4:001f1e2d
[<c00e8b10>] (sys_ioctl) from [<c0009000>] (ret_fast_syscall+0x0/0x50)
Exception stack(0xc1207fa8 to 0xc1207ff0)
7fa0:                   001f1e2d becdce5c 00000003 00008914 becdcc68 001f1e2d
7fc0: 001f1e2d becdce5c becdcc68 00000036 00000000 00000000 001c75bc 00000000
7fe0: becdcf55 becdcc38 0000bda8 0000913c
handlers:
[<d45e8675>] net_interrupt
Disabling IRQ #57
cs89x0: eth0: EEPROM is configured for unavailable media
ifconfig: SIOCSIFFLAGS: Resource temporarily unavailable
root@nano2410#

经搜索,
添加链接描述
这篇文章给了详细的解释。

3. EEPROM is configured for unavailable media

root@nano2410#ifconfig eth0 192.168.0.3
cs89x0: eth0: EEPROM is configured for unavailable media
ifconfig: SIOCSIFFLAGS: Resource temporarily unavailable
root@nano2410#ifconfig eth0 192.168.0.3 up
cs89x0: eth0: EEPROM is configured for unavailable media
ifconfig: SIOCSIFFLAGS: Resource temporarily unavailable
root@nano2410#

经搜索,
【linux】linux内核移植错误记录
这篇文章给了详细的解释。


http://www.ppmy.cn/news/249138.html

相关文章

Linux-2.6.20的cs8900驱动分析(三)

本博客转载于&#xff1a;http://blog.chinaunix.net/xmlrpc.php?rblog/article&uid22535114&id1773576 三、net_rx和net_send_packet 3.1 net_rx 在这部分将介绍cs8900驱动的两个最重要的函数&#xff0c;内核通过该两个函数实现了数据的收发。net_rx函数的主要功能是…

CS8900A网络驱动程序移植

上图为开发板上的网卡原理图&#xff0c;可得到&#xff1a; 1.CS8900A的访问基址为0x19000000 2.总线位宽为16 3.中断引脚为EINT9 驱动文件drivers/net/cs89x0.c既可以编进内核&#xff0c;也可以编译为一个可加载模块。编译进内核时&#xff0c;它的入口函数为cs89x0_pro…

LT8900低成本的无线电收发器 2.4G射频芯片 CMOS射频收发器

LT8900低成本的2.4GHz无线电收发器 概述 LT8900是一个低成本&#xff0c;完全集成CMOS射频收发器&#xff0c;GFSK数据调制解调器&#xff0c;和数据包框架&#xff0c;优化用于中GHz ISM波段。 它包含发射接收射频合成器&#xff0c;和数字调制解调器功能&#xff0c;少数外…

中兴服务器售后,中兴全兼容智能视讯服务器ZXMVC8900

全兼容智能视讯服务器ZXMVC8900 中兴全兼容智能视讯服务器ZXMVC8900采用电信交换机架构设计&#xff0c;全面支持ITU-T H.323、H.320协议&#xff0c;可通过不同网络(IP、ISDN、DDN、SDH、ATM、卫星等)接入用户终端&#xff0c;并组织召开视频会议。 XMVC8900具有全兼容各种网络…

STM32驱动JQ8900语音模块

上次写了esp32驱动JQ8900模块&#xff0c;我做设计一般会把外设先在esp32上实现一般&#xff0c;再移植到比较复杂的stm32上去。直接上正常运行的干货代码。 文章目录 一、硬件准备二、程序编写1.jq8900.c2.jq8900.h3.main.c 三、音频替换总结 一、硬件准备 STM32F10x系列任意…

Linux 下 cs8900a 的移植说明

Linux 下 cs8900a 的移植说明 为 cs8900a 建立编译菜单 1. 拷贝到文件把 cs8900a 的压缩包拷贝到 arm 用户下的 dev_home/localapps/ [armlocalhost localapps]$ tar xzvf cs8900a.tar.gz [armlocalhost localapps]$cd cs8900a [armlocalhost cs8900a]$cp cs8900a.c $KERNEL/l…

LD3320语音识别模块+JQ8900-TF语音模块实现简单的语音交互控制

玩这个真的要感谢头条的强大推荐&#xff0c;清明节回家的大巴车上&#xff0c;无聊的刷着头条&#xff0c;很智能的给我推荐了一款语音识别模块&#xff0c;一直很想自己试着玩一把的我&#xff0c;按奈不住&#xff0c;点开视频看到了介绍&#xff0c;接着我就淘宝一下&#…

八重州8900如何解锁_八重贵族怪胎之路

八重州8900如何解锁 Dealing with computers day in and day out can be a harrowing experience. In difficult times, or even when things are idle, finding some spirituality can help cope with the experience—Techies: I give you the Eightfold Noble Geek Path. 日…