watchdogtest: add qcom_wdt_trigger_bite for trigger wdog

Qcom introduces new watchdog architecture on 4350/8350, so use
"qcom_wdt_trigger_bite" to trigger wdog when enable CONFIG_QCOM_WDT_CORE

Change-Id: Ide2ccb0e5a498454359fd6544e832f109251df5c
Reviewed-on: https://gerrit.mot.com/1782962
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
jixj 2020-10-23 11:27:59 +08:00 • committed by Xiaojun Ji
commit c5ebfbf74d

View file

@ -75,14 +75,16 @@ static int watchdog_test_init(void)
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)
trigger_wdog_bite = (void *)kallsyms_lookup_name("msm_trigger_wdog_bite");
#else
#ifdef CONFIG_ARCH_QCOM
#if defined(CONFIG_QCOM_WATCHDOG_V2)
trigger_wdog_bite = msm_trigger_wdog_bite;
#elif defined(CONFIG_QCOM_WDT_CORE)
trigger_wdog_bite = qcom_wdt_trigger_bite;
#else
trigger_wdog_bite = NULL;
#endif
#endif
if (!trigger_wdog_bite)
printk(KERN_ERR "Failed to get msm_trigger_wdog_bite address\n");
printk(KERN_ERR "Failed to get trigger_wdog_bite address\n");
return 0;
}