ANDROID: soc: qcom: cmd-db: Allow COMMAND_DB driver to be loaded as a module

This patch allow the Qcom cmd-db driver to be loaded as a
permanent module. It can be loaded as a module, but can't
be unloaded. That should be OK because few core Qcom drivers,
mainly RPMH, which depend on cmd-db are configured as
permanent modules as well.

This version is only for android11-5.4. For android-mainline
and android12-5.4, the fix will come from upstream.

Bug: 161128971
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I5bec1700b3202024c7f16bff9e823d658a371ac5
This commit is contained in:
Amit Pundir 2020-07-22 15:50:40 +05:30 • committed by Todd Kjos
commit bec9314fb3
4 changed files with 7 additions and 2 deletions

View file

@ -65,3 +65,4 @@ CONFIG_QCOM_SCM=m
CONFIG_ARM_SMMU=m
CONFIG_INCREMENTAL_FS=m
CONFIG_PINCTRL_MSM=m
CONFIG_QCOM_COMMAND_DB=m

View file

@ -420,7 +420,6 @@ CONFIG_MAILBOX=y
CONFIG_IOMMU_LIMIT_IOVA_ALIGNMENT=y
CONFIG_REMOTEPROC=y
CONFIG_RPMSG_CHAR=y
CONFIG_QCOM_COMMAND_DB=y
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
CONFIG_DEVFREQ_GOV_POWERSAVE=y
CONFIG_DEVFREQ_GOV_USERSPACE=y

View file

@ -17,7 +17,7 @@ config QCOM_AOSS_QMP
Subsystem (AOSS) using Qualcomm Messaging Protocol (QMP).
config QCOM_COMMAND_DB
bool "Qualcomm Command DB"
tristate "Qualcomm Command DB"
depends on ARCH_QCOM || COMPILE_TEST
depends on OF_RESERVED_MEM
help

View file

@ -2,6 +2,7 @@
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. */
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
@ -266,6 +267,7 @@ static const struct of_device_id cmd_db_match_table[] = {
{ .compatible = "qcom,cmd-db" },
{ },
};
MODULE_DEVICE_TABLE(of, cmd_db_match_table);
static struct platform_driver cmd_db_dev_driver = {
.probe = cmd_db_dev_probe,
@ -280,3 +282,6 @@ static int __init cmd_db_device_init(void)
return platform_driver_register(&cmd_db_dev_driver);
}
arch_initcall(cmd_db_device_init);
MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Command DB for QCOM SoCs");
MODULE_LICENSE("GPL v2");