drivers: qcom: cmd-db: modularize commandDB driver

Add support for compiling commandDB as module. Since the command DB data
is written to DDR by a remote processor and exists while the system is
active, removing the module does not make sense. Initialize the driver
as builtin platform driver.

Change-Id: I3e8909f556815b6831947661531f1e4d3c464a86
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
This commit is contained in:
Lina Iyer 2019-07-16 16:32:10 -06:00
commit 75afa532e7
2 changed files with 5 additions and 6 deletions

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 Technologies, Inc. Command DB driver"
depends on ARCH_QCOM || COMPILE_TEST
depends on OF_RESERVED_MEM
help

View file

@ -2,6 +2,7 @@
/* Copyright (c) 2016-2019, 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>
@ -274,9 +275,7 @@ static struct platform_driver cmd_db_dev_driver = {
.of_match_table = cmd_db_match_table,
},
};
builtin_platform_driver(cmd_db_dev_driver);
static int __init cmd_db_device_init(void)
{
return platform_driver_register(&cmd_db_dev_driver);
}
arch_initcall(cmd_db_device_init);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Qualcomm Technologies, Inc. CommandDB driver");