diff --git a/arch/arm64/configs/vendor/lahaina_GKI.config b/arch/arm64/configs/vendor/lahaina_GKI.config index 046230c32fcf..1ef281081c68 100644 --- a/arch/arm64/configs/vendor/lahaina_GKI.config +++ b/arch/arm64/configs/vendor/lahaina_GKI.config @@ -55,6 +55,7 @@ CONFIG_QCOM_LAHAINA_LLCC=m CONFIG_QCOM_IPCC=m CONFIG_QCOM_WATCHDOG=m CONFIG_QCOM_FORCE_WDOG_BITE_ON_PANIC=y +CONFIG_QCOM_MEMORY_DUMP_V2=m CONFIG_QCOM_SCM=m CONFIG_QTEE_SHM_BRIDGE=y # CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set diff --git a/arch/arm64/configs/vendor/lahaina_QGKI.config b/arch/arm64/configs/vendor/lahaina_QGKI.config index 7faac13299aa..af9be218da7e 100644 --- a/arch/arm64/configs/vendor/lahaina_QGKI.config +++ b/arch/arm64/configs/vendor/lahaina_QGKI.config @@ -83,7 +83,6 @@ CONFIG_ARM_QCOM_DEVFREQ_QOSLAT=y CONFIG_QCOM_LLCC_PMU=y CONFIG_QCOM_GUESTVM=y CONFIG_QTI_TZ_LOG=y -CONFIG_QCOM_MEMORY_DUMP_V2=y CONFIG_MSM_REMOTEQDSS=y CONFIG_QCOM_DCC_V2=y CONFIG_CLD_LL_CORE=y diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index eb156def758f..dcc3c90d3937 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -386,7 +386,7 @@ config QCOM_SMD_RPM module. This will build a module called "qcom-smd-rpm". config QCOM_MEMORY_DUMP_V2 - bool "QCOM Memory Dump V2 Support" + tristate "QCOM Memory Dump V2 Support" help This enables memory dump feature. It allows various client subsystems to register respective dump regions. At the time diff --git a/drivers/soc/qcom/memory_dump_v2.c b/drivers/soc/qcom/memory_dump_v2.c index f1b37a222967..e997ae357602 100644 --- a/drivers/soc/qcom/memory_dump_v2.c +++ b/drivers/soc/qcom/memory_dump_v2.c @@ -892,9 +892,7 @@ static struct platform_driver mem_dump_driver = { }, }; -static int __init mem_dump_init(void) -{ - return platform_driver_register(&mem_dump_driver); -} +module_platform_driver(mem_dump_driver); -pure_initcall(mem_dump_init); +MODULE_DESCRIPTION("Memory Dump V2 Driver"); +MODULE_LICENSE("GPL v2"); diff --git a/include/soc/qcom/memory_dump.h b/include/soc/qcom/memory_dump.h index 96bf9304bc2a..00bd60c28f67 100644 --- a/include/soc/qcom/memory_dump.h +++ b/include/soc/qcom/memory_dump.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2012, 2014-2017, 2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2012, 2014-2017, 2020, The Linux Foundation. All rights reserved. */ #ifndef __MSM_MEMORY_DUMP_H @@ -42,7 +42,7 @@ static inline int msm_dump_tbl_register(struct msm_client_dump *entry) #endif -#if defined(CONFIG_QCOM_MEMORY_DUMP) || defined(CONFIG_QCOM_MEMORY_DUMP_V2) +#if IS_ENABLED(CONFIG_QCOM_MEMORY_DUMP_V2) extern uint32_t msm_dump_table_version(void); #else static inline uint32_t msm_dump_table_version(void) @@ -114,7 +114,7 @@ struct msm_dump_entry { uint64_t addr; }; -#ifdef CONFIG_QCOM_MEMORY_DUMP_V2 +#if IS_ENABLED(CONFIG_QCOM_MEMORY_DUMP_V2) extern int msm_dump_data_register(enum msm_dump_table_ids id, struct msm_dump_entry *entry); extern int msm_dump_data_register_nominidump(enum msm_dump_table_ids id,