FM引起的softdog

[现象]10063
   BRCM4330,进入FM,可以收听没有问题,但是点击界面的关闭按钮————>点击界面的关闭按钮再次打开,系统重启。必现。


[分析] 重启后adb pull /proc/last_kmsg  .
      导出log 如下

[  639.510000] <<-GTP-DEBUG->> [730]pre_touch:00, finger:80.
[  639.520000] eic_handler
[  639.520000] eic_handler
[  639.521000] <<-GTP-DEBUG->> [730]pre_touch:00, finger:80.
[  639.529000] -->bluetooth_set_power, a[0]
[  668.248000] soft watch triggered here, wait for 2 seconds to collect logs
[  670.248000] SoftDog: Initiating system reboot: 0 0
[  670.248000] Kernel panic - not syncing: SoftDog: Timeout!!!
[  670.248000] 
[  670.248000] [<c4532e68>] (unwind_backtrace+0x0/0xfc) from [<c48b20a8>] (panic+0x58/0xdc)
[  670.248000] [<c48b20a8>] (panic+0x58/0xdc) from [<c475ee5c>] (watchdog_fire+0x78/0xc4)
[  670.248000] [<c475ee5c>] (watchdog_fire+0x78/0xc4) from [<c4567dbc>] (run_timer_softirq+0x11c/0x254)
[  670.248000] [<c4567dbc>] (run_timer_softirq+0x11c/0x254) from [<c4562960>] (__do_softirq+0x8c/0x118)
[  670.248000] [<c4562960>] (__do_softirq+0x8c/0x118) from [<c4562a68>] (irq_exit+0x7c/0x98)
[  670.248000] [<c4562a68>] (irq_exit+0x7c/0x98) from [<c4552f30>] (nk_do_xirq+0x118/0x150)
[  670.249000] [<c4552f30>] (nk_do_xirq+0x118/0x150) from [<c48b470c>] (__irq_svc_loop+0x14/0x3c)
[  670.249000] [<c48b470c>] (__irq_svc_loop+0x14/0x3c) from [<c46d4908>] (serialsc8800_startup+0x64/0x150)
[  670.249000] [<c46d4908>] (serialsc8800_startup+0x64/0x150) from [<c46d2dd4>] (uart_startup+0x5c/0x180)
[  670.249000] [<c46d2dd4>] (uart_startup+0x5c/0x180) from [<c46d3a00>] (uart_open+0xec/0x3bc)
[  670.249000] [<c46d3a00>] (uart_open+0xec/0x3bc) from [<c46ca138>] (tty_open+0x1ec/0x41c)
[  670.249000] [<c46ca138>] (tty_open+0x1ec/0x41c) from [<c45dffa0>] (chrdev_open+0xb4/0x148)
[  670.249000] [<c45dffa0>] (chrdev_open+0xb4/0x148) from [<c45db90c>] (__dentry_open+0xc4/0x258)
[  670.249000] [<c45db90c>] (__dentry_open+0xc4/0x258) from [<c45dbb78>] (nameidata_to_filp+0x50/0x58)
[  670.249000] [<c45dbb78>] (nameidata_to_filp+0x50/0x58) from [<c45e6b6c>] (do_last+0x37c/0x664)
[  670.249000] [<c45e6b6c>] (do_last+0x37c/0x664) from [<c45e8b34>] (do_filp_open+0x1b0/0x5a0)
[  670.249000] [<c45e8b34>] (do_filp_open+0x1b0/0x5a0) from [<c45db75c>] (do_sys_open+0x5c/0x120)
[  670.249000] [<c45db75c>] (do_sys_open+0x5c/0x120) from [<c452df20>] (ret_fast_syscall+0x0/0x5c)


是uart 传输过程中触发了softdog,引起kernel  panic!
1)确认客户的参考设计的修改:wifi不用sdio而用spi,hostwake 和extwake两个pin与参考设计不一样!!
   在我们的机器上验证原始版本FM没有问题!!
这两点非常重要。
2)首先会怀疑uart驱动,搜索serialsc8800_startup,去看uart驱动却看不出个所以然来。。。。。
3)在brcm_patchram_plus.c中的main 函数加打印信息,每次打开FM都会在此函数中下载firmware,发现是走到了proc_reset()这个函数,
而这是通过uart向bcm4330发cmd的阶段,还没有走到下载firmware的阶段。这更证明了确实uart传输有问题
4)于是又去看uart驱动,依然看不出个所以然来。。。。。不知到为何无法传输。。。。。
5)想要根据spec的BT打开时序测量信号是否正常,但客户的板子没有测试点无法量到。
6)重新检查pin gpio配置,发现一个地方配置错误,board_cfg.c中release
const unsigned long brcm_bt2ap_set_pin_cfg[] = {
MFP_CFG_X(RFCTL1, AF3, DS1, F_PULL_UP, S_PULL_UP, IO_OE), // GPIO 91
MFP_CFG_X(RFCTL2, AF3, DS1, F_PULL_UP, S_PULL_UP, IO_IE), // GPIO 92
};
这是设置hostwake 和extwake两个pin, 必须按照客户修改pin重新配置为客户的pin
而客户虽然知道在这里修改,但却改错了,其中一个pin配置成了bt_reset!!

[总结]
         解决后再分析panic的原因,应该是brcm4330芯片不响应uart,导致无法通信出现panic。
这种问题直接从log的backtrace中去确定BRCM芯片问题非常苦难,除非对uart的驱动十分熟悉。
所以整个问题流转是:pinmap配置错误---->芯片不在工作状态---->uart通信异常---->panic。
硬件不响应也会导致panic

你可能感兴趣的:(FM引起的softdog)