diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index d47cd893fbfb..c4b1efe0b9d3 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -783,9 +783,18 @@ config CDSPRM_VTCM_DYNAMIC_DEBUG enabled, the vtcm partition details are sent to the CDSP via rpmsg channel. +config QCOM_WDT_CORE + tristate "Qualcomm Technologies, Inc. Watchdog Support" + depends on ARCH_QCOM + help + This enables the watchdog module. It causes kernel panic if the + watchdog times out. It allows for detection of cpu hangs and + deadlocks. It does not run during the bootup process, so it will + not catch any early lockups. + config QCOM_FORCE_WDOG_BITE_ON_PANIC bool "QCOM force watchdog bite on panic" - depends on QCOM_WATCHDOG + depends on QCOM_WDT_CORE help This forces a watchdog bite when the device restarts due to a kernel panic. On certain MSM SoCs, @@ -794,7 +803,7 @@ config QCOM_FORCE_WDOG_BITE_ON_PANIC config QCOM_WDOG_BITE_EARLY_PANIC bool "QCOM early panic watchdog bite" - depends on QCOM_WATCHDOG && QCOM_FORCE_WDOG_BITE_ON_PANIC + depends on QCOM_WDT_CORE && QCOM_FORCE_WDOG_BITE_ON_PANIC help This forces a watchdog bite early in panic sequence. On certain MSM SoCs, this provides us additional debugging information at the diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile index cf4c353c7d64..a18a6cfc768e 100644 --- a/drivers/soc/qcom/Makefile +++ b/drivers/soc/qcom/Makefile @@ -84,6 +84,7 @@ obj-$(CONFIG_MSM_QBT_HANDLER) += qbt_handler.o obj-$(CONFIG_QTI_CRYPTO_COMMON) += crypto-qti-common.o obj-$(CONFIG_QTI_CRYPTO_TZ) += crypto-qti-tz.o obj-$(CONFIG_QTI_HW_KEY_MANAGER) += hwkm.o crypto-qti-hwkm.o +obj-$(CONFIG_QCOM_WDT_CORE) += qcom_wdt_core.o ifdef CONFIG_DEBUG_FS obj-$(CONFIG_MSM_RPM_SMD) += rpm-smd-debug.o endif diff --git a/drivers/soc/qcom/qcom_watchdog.c b/drivers/soc/qcom/qcom_wdt_core.c similarity index 99% rename from drivers/soc/qcom/qcom_watchdog.c rename to drivers/soc/qcom/qcom_wdt_core.c index 918274de9ed9..93808cbad4e4 100644 --- a/drivers/soc/qcom/qcom_watchdog.c +++ b/drivers/soc/qcom/qcom_wdt_core.c @@ -770,7 +770,7 @@ static int __init init_watchdog(void) { return platform_driver_register(&msm_watchdog_driver); } -#if IS_MODULE(CONFIG_QCOM_WATCHDOG) +#if IS_MODULE(CONFIG_QCOM_WDT_CORE) module_init(init_watchdog); #else pure_initcall(init_watchdog); diff --git a/include/soc/qcom/watchdog.h b/include/soc/qcom/watchdog.h index a69ef8b9c7db..358548d73615 100644 --- a/include/soc/qcom/watchdog.h +++ b/include/soc/qcom/watchdog.h @@ -18,7 +18,7 @@ #define WDOG_BITE_EARLY_PANIC 0 #endif -#if IS_ENABLED(CONFIG_QCOM_WATCHDOG) +#if IS_ENABLED(CONFIG_QCOM_WDT_CORE) void msm_trigger_wdog_bite(void); #else static inline void msm_trigger_wdog_bite(void) { }