From patchwork Thu Mar 26 22:44:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 184936 Delivered-To: patches@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp616631ilr; Thu, 26 Mar 2020 15:45:05 -0700 (PDT) X-Received: by 2002:a17:902:fe97:: with SMTP id x23mr10551597plm.167.1585262705467; Thu, 26 Mar 2020 15:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585262705; cv=none; d=google.com; s=arc-20160816; b=fU8uLQ3qXMYq5y/LiKQHpWB2lQ5/a+1o5NAyudgEAMmuDVEp2VfHDDiGx2RZEF3g+v YXWoTuYeE6kPx3si/hc2+TBJK4tmwwxbbm5ykgSQDgdCkd6dz7HAZ3vwlqUdvzQLSBf8 272XWXS/wB5EeJ8duTp/2/7wLMCZIW8GWitosvBRGhxFsdbA/4hIVeRwkGuaDeD3mtj5 3XUaqYIeSnVqbsWOFh4A3i6fr4SYAENfCsaT84k6gAqyDq7IENnNEHw6ii5bVHWEEwvN cKa0XHSVBTUCYj/Y7spoekGCqDY3lddQKqIGxWMzk/qaIGVZzZLTD42IBcGk5cglNB1O anUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BibBtGLwvmKQbx0thQsTKW+m6NhfuyqCvXSj60tccDo=; b=tAJlhU/k3WorYCEDPAzE2W6TiU/rXKUfqRnB3c9HpzdPmqv4MkC4OaXTrka5QdBY98 ti9fgy3KG15sH23A/unEonIb8Iw8lkMubs/UUVYrwFdiPDdLnnunPqgEcFimQWtePBr+ kS1HDJZxl3v7eUBPTxQ21sF2NK3dbMIk1MySMZBixERXM/JsMnZfTEBOYi0nNF7pWdQS b0uEfpVtArJUFsA6RXF+J3VWmEHkmgDjvPfQAiYfU5LJnRAptyNmijfSaoo088C5nw/H NoLnb4BKN529qZOL3Z8t5c2XVbbWBnWzG1Znvs+WoSJAeVFgX6qSmBGvrwHSHGFsP6u1 SNNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=flZpKzNJ; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id y14sor4827393pfp.36.2020.03.26.15.45.05 for (Google Transport Security); Thu, 26 Mar 2020 15:45:05 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=flZpKzNJ; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BibBtGLwvmKQbx0thQsTKW+m6NhfuyqCvXSj60tccDo=; b=flZpKzNJcKTxocpBQsnbos0dcK3aTkIvYGIK9dtTslwcM1iiJ1s0l8VJhBlBLG8UQ6 I/3J/RcTYzwclhVvm5EYqR/ZzX09Kh/SxlvtdomLiMb4PQlqY1/ROIUCrxYdNGUHP/6p oDEfMDj32AHSQGD0IPXy4cC2zDHC6wH1EzS5T1Zej6ehS5fTjqwrjxmsfUeotYtcH0H/ WCqTEoyC5Wqc2ghhQV0GM5GoLw9o2Omrx1xtAb9WlAjy7RukGMNbXYGynHB0h/TiVxnE Jlr0yYuGZo6VPMKx8aZiGnMWRwfWYclIexDl7oKyEAlyRhkwYGd4JZe3ufZXEEqYDeQ7 yQjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BibBtGLwvmKQbx0thQsTKW+m6NhfuyqCvXSj60tccDo=; b=L+7FqjbIu5CbXqee+BA5gbKGOTMwncFCdYj68Y6KtAOpCNxIlIsiaLM7Fwa7n4ySJ4 DgbDFYk3vd2bIrnQ1/MKTFxT9xymsV4BH/tfW52qY2Nw8tNB39M66argzEXxWO4iB0u7 80L9TwEa6qkoCa5XMbYa70A9l2diyshTaj87UKSIs9q5YjmuUjffSf/aa76eG8mNxDbK B4Pcm5tvLjKXx2OfcNeWeTPJr2MOUCeNUZCgOSJxFnaxnP6kJkmHPtierxsVvRt9SDwR 68Ln585Hmxn/94C3aIDn9ub5RrhZTKzJKHf4xLGBboqziBbxr7rCdAc+JUnE9/P9AQza D2FA== X-Gm-Message-State: ANhLgQ33MHXkZjcYKypPGgR9QL9CwCfHGFakbHLQ/TmKCyMGIpASTiKB ug0p+CVOTY3z6hP0CswhkS68LQAm X-Google-Smtp-Source: ADFU+vsJ1o2UHUr5ZHKd/XXcN8AZhYuiYsHkoVFN14N8MhOoYypiyukKcfGgQMCKoQycbMrNm8DnWg== X-Received: by 2002:a63:a55d:: with SMTP id r29mr11142296pgu.248.1585262705086; Thu, 26 Mar 2020 15:45:05 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id g10sm2592788pfk.90.2020.03.26.15.45.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2020 15:45:04 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Todd Kjos , Saravana Kannan , Andy Gross , Bjorn Andersson , Rajendra Nayak , linux-arm-msm@vger.kernel.org Subject: [PATCH v3 2/3] soc: qcom: rpmh: Allow RPMH driver to be loaded as a module Date: Thu, 26 Mar 2020 22:44:58 +0000 Message-Id: <20200326224459.105170-3-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200326224459.105170-1-john.stultz@linaro.org> References: <20200326224459.105170-1-john.stultz@linaro.org> This patch allow the rpmh driver to be loaded as a permenent module. Meaning it can be loaded from a module, but then cannot be unloaded. Ideally, it would include a remove hook and related logic, but the rpmh driver is fairly core to the system, so once its loaded with almost anythign else to get the system to go, the dependencies are not likely to ever also be removed. So making it a permenent module at least improves things slightly over requiring it to be a built in driver. Feedback would be appreciated! Cc: Todd Kjos Cc: Saravana Kannan Cc: Andy Gross Cc: Bjorn Andersson Cc: Rajendra Nayak Cc: linux-arm-msm@vger.kernel.org Signed-off-by: John Stultz --- drivers/soc/qcom/Kconfig | 2 +- drivers/soc/qcom/rpmh-rsc.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index af774555b9d2..ac91eaf810f7 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -104,7 +104,7 @@ config QCOM_RMTFS_MEM Say y here if you intend to boot the modem remoteproc. config QCOM_RPMH - bool "Qualcomm RPM-Hardened (RPMH) Communication" + tristate "Qualcomm RPM-Hardened (RPMH) Communication" depends on ARCH_QCOM && ARM64 || COMPILE_TEST help Support for communication with the hardened-RPM blocks in diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c index e278fc11fe5c..30585d98fdf1 100644 --- a/drivers/soc/qcom/rpmh-rsc.c +++ b/drivers/soc/qcom/rpmh-rsc.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -679,6 +680,8 @@ static const struct of_device_id rpmh_drv_match[] = { { .compatible = "qcom,rpmh-rsc", }, { } }; +MODULE_DEVICE_TABLE(of, rpmh_drv_match); + static struct platform_driver rpmh_driver = { .probe = rpmh_rsc_probe, @@ -693,3 +696,6 @@ static int __init rpmh_driver_init(void) return platform_driver_register(&rpmh_driver); } arch_initcall(rpmh_driver_init); + +MODULE_DESCRIPTION("Qualcomm Technologies, Inc. RPMh Driver"); +MODULE_LICENSE("GPL v2");