我用的是老版本的内核,根据最近的内核版本我将\drivers\input\touchscreen目录下的ti_tscadc.c分解成drivers\mfd\ti_tscadc.c、drivers\staging\iio\adc\ti_adc.c、drivers\input\touchscreenti_tsc.c三个文件,并对board-am335xevm.c做了相应的修改,将触摸屏驱动与ADC(AIN4-AIN7)驱动编译进内核,启动开发板时,发现板子报错,board-am335xevm.c的结构体 tscadc中只要含有 .tsc_init = &am335x_touchscreen_data这一项就会报错,即使这个结构体中只有 .tsc_init = &am335x_touchscreen_data这一项
static struct mfd_tscadc_board tscadc = { .tsc_init = &am335x_touchscreen_data,
.adc_init = &am335x_adc_data,
};
报错消息如下:
irq 16: nobody cared (try booting with the "irqpoll" option)
Backtrace:[<c00181e0>] (dump_backtrace+0x0/0x10c) from [<c05abf38>] (dump_stack+0x18/0x1c)
r7:00000000 r6:00000010 r5:c0816ca8 r4:00000000
[<c05abf20>] (dump_stack+0x0/0x1c) from [<c0074924>] (__report_bad_irq+0x28/0xb8)
[<c00748fc>] (__report_bad_irq+0x0/0xb8) from [<c0074b88>] (note_interrupt+0x1d4/0x230)
r5:c0816ca8 r4:00000000
[<c00749b4>] (note_interrupt+0x0/0x230) from [<c0072dd0>] (handle_irq_event_percpu+0xac/0x1a4)
[<c0072d24>] (handle_irq_event_percpu+0x0/0x1a4) from [<c0072ef8>] (handle_irq_event+0x30/0x40)
[<c0072ec8>] (handle_irq_event+0x0/0x40) from [<c0075834>] (handle_level_irq+0x88/0xf0)
r5:00000010 r4:c0816ca8
[<c00757ac>] (handle_level_irq+0x0/0xf0) from [<c0072920>] (generic_handle_irq+0x3c/0x48)
r5:00000010 r4:c08271b4
[<c00728e4>] (generic_handle_irq+0x0/0x48) from [<c0015238>] (handle_IRQ+0x38/0x8c)
[<c0015200>] (handle_IRQ+0x0/0x8c) from [<c0008500>] (omap3_intc_handle_irq+0x50/0x54)
r7:cf81dd54 r6:ffffffff r5:cf81dd20 r4:fa200000
[<c00084b0>] (omap3_intc_handle_irq+0x0/0x54) from [<c05ae0c0>] (__irq_svc+0x40/0x60)
Exception stack(0xcf81dd20 to 0xcf81dd68)
dd20: 00000000 ffffffc0 00000000 0000000a 00000000 00000002 c086d600 cf81c000
dd40: c0813fe4 00000000 c086d600 cf81dda4 cf81dda8 cf81dd68 c004195c c00416c8
dd60: 20000113 ffffffff
r5:20000113 r4:c00416c8
[<c0041674>] (__do_softirq+0x0/0x120) from [<c004195c>] (irq_exit+0x90/0xac)
[<c00418cc>] (irq_exit+0x0/0xac) from [<c001523c>] (handle_IRQ+0x3c/0x8c)
[<c0015200>] (handle_IRQ+0x0/0x8c) from [<c0008500>] (omap3_intc_handle_irq+0x50/0x54)
r7:cf81de24 r6:ffffffff r5:cf81ddf0 r4:fa200000
[<c00084b0>] (omap3_intc_handle_irq+0x0/0x54) from [<c05ae0c0>] (__irq_svc+0x40/0x60)
Exception stack(0xcf81ddf0 to 0xcf81de38)
dde0: cf9d5900 f9e0d000 0000007a 0000042c
de00: 1ffe0000 00100072 00000098 cf9c1400 cf864a00 00000000 cf3be408 cf81de54
de20: f9e0d000 cf81de3c c05a9c50 c032eef0 20000013 ffffffff
r5:20000013 r4:c032eef0
[<c032ee9c>] (tsc_step_config+0x0/0x1c4) from [<c05a9c50>] (tscadc_probe+0x118/0x220)
r6:cf3be400 r5:00000000 r4:cf9d5900
[<c05a9b38>] (tscadc_probe+0x0/0x220) from [<c0258014>] (platform_drv_probe+0x20/0x24)
[<c0257ff4>] (platform_drv_probe+0x0/0x24) from [<c0256b68>] (driver_probe_device+0xa0/0x1ac)
[<c0256ac8>] (driver_probe_device+0x0/0x1ac) from [<c0256d08>] (__driver_attach+0x94/0x98)
r9:00000000 r8:c07d2354 r7:00000000 r6:cf3be43c r5:c08373c4
r4:cf3be408
[<c0256c74>] (__driver_attach+0x0/0x98) from [<c025631c>] (bus_for_each_dev+0x68/0x94)
r7:00000000 r6:c0256c74 r5:cf81dee0 r4:c08373c4
[<c02562b4>] (bus_for_each_dev+0x0/0x94) from [<c02569b8>] (driver_attach+0x24/0x28)
r7:00000000 r6:cf9d4ac0 r5:c082c1d0 r4:c08373c4
[<c0256994>] (driver_attach+0x0/0x28) from [<c0255b84>] (bus_add_driver+0xa8/0x23c)
[<c0255adc>] (bus_add_driver+0x0/0x23c) from [<c025736c>] (driver_register+0x80/0x13c)
[<c02572ec>] (driver_register+0x0/0x13c) from [<c02584b0>] (platform_driver_register+0x4c/0x60)
r7:00000013 r6:c003f58c r5:c084bdc0 r4:c07efd40
[<c0258464>] (platform_driver_register+0x0/0x60) from [<c07d2368>] (ti_tsc_init+0x14/0x1c)
[<c07d2354>] (ti_tsc_init+0x0/0x1c) from [<c0008608>] (do_one_initcall+0x3c/0x190)
[<c00085cc>] (do_one_initcall+0x0/0x190) from [<c07b3288>] (kernel_init+0x80/0x124)
[<c07b3208>] (kernel_init+0x0/0x124) from [<c003f58c>] (do_exit+0x0/0x69c)
r5:c07b3208 r4:00000000
handlers:
[<c032f18c>] tscadc_interrupt
Disabling IRQ #16
请问这情况是什么引起的呢?
cheng feng:
我将drivers\input\touchscreenti_tsc.c文件中probe函数里的err = request_irq(ts_dev->irq, tscadc_interrupt, IRQF_SHARED,pdev->dev.driver->name, ts_dev);删掉之后就不再报错,但是这样触摸屏驱动也将不能申请成功了。请教有懂的人士指导
Gary Wu:
回复 cheng feng:
你好!请问使用的老版本SDK是具体哪一个版本?
TS和ADC同时使用,在SDK05.07.00.00及之后的版本才支持。
具体可以参考链接http://www.deyisupport.com/question_answer/w/faq/469.am335x-linux.aspx
cheng feng:
回复 Gary Wu:
是SDK04的版本,我现在直接在上面修改,将原先的\drivers\input\touchscreen目录下的ti_tscadc.c根据现在的源码分解成drivers\mfd\ti_tscadc.c、drivers\staging\iio\adc\ti_adc.c、drivers\input\touchscreen\ti_tsc.c三个文件,但是发现代码执行到drivers\input\touchscreen\ti_tsc.c文件中err = request_irq(ts_dev->irq, tscadc_interrupt, IRQF_SHARED,pdev->dev.driver->name, ts_dev);就报错
irq 16: nobody cared (try booting with the "irqpoll" option)
Backtrace:
。。。。。(消息内容在1楼中有)
Disabling IRQ #16
请问中断申请为何会出现这样的错误。
Yaoming Qin:
建议您查看最新的kernel,并参考下面的文档:
http://processors.wiki.ti.com/index.php/AM335x_ADC_Driver%27s_Guide