FM引起的softdog

來源:互聯網
上載者:User

[現象]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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.