From patchwork Thu Jun 25 00:10:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 191721 Delivered-To: patches@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp318436ilg; Wed, 24 Jun 2020 17:10:50 -0700 (PDT) X-Received: by 2002:a63:eb55:: with SMTP id b21mr23881349pgk.433.1593043850435; Wed, 24 Jun 2020 17:10:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593043850; cv=none; d=google.com; s=arc-20160816; b=TT4WV2sr2j4r83ZFSLl9ixFdNDlXZwMup61+LB+GTot68vpxOOpZvmYc87sSa/0Iip qazXJLbSjl1jsWgqwiyiWPQ1Zlgp1ApVsxaa2ixoroce/mFRf29lPLg1G1/RWQYLMbQn v4GjmkxG2qUILPcglhrgCWEvLzOKh2GFf0UoywWQcpZR5DWQ05WbRBw3uf8c1fXLwklH mKoAofZ2c2APPdVgPSmANnDSoFzuFMI6zD5ZKZwDglXGBn+5XG6n3/8r2oOVXJdhUNuO CdO5VzhVNT61WVlmzXHZSkDO6B/ZZ50TXrfAwU6G/q5PxCe1vM4+H26SE3fqd4ZCZR50 1qXw== 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=kiF3eDPsXk3VmmQHETFrF9xdJnTYDdY6wfkANtzZV7Q=; b=yHzioyRdZ5zgm3hKpMKqJpDcAZe0hXpJ5Im2CR1Keg48k0CZQXDVtK1z1ySd+TLH2F IUUMG8r68pJwT0gBwixFtozfkWbfON5U8s3nnN8nV7Mgu2zii7PWY50jExHEbDOQ2vsg 88RK3Ei9NeFxPJdbcP5+GWyX3CXJLszMh92s3DUiIYzmELLZrKAysOP4mx8aThH1DERo 4xj7AGYWu8br9E2/8brPG/MUtrOb15Jy5IeouLvRynP9fEmur9edcAFKseqLxW/miSP5 dkbj0UcKgcpoM+HjWZ8iyA6gVz6LZzzqxIFTAoJ6hdKCc15XnWPUxy14Xg3j62Pjsdlp lHAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ghZjuyMC; 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 b135sor26823293pga.85.2020.06.24.17.10.50 for (Google Transport Security); Wed, 24 Jun 2020 17:10:50 -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=ghZjuyMC; 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=kiF3eDPsXk3VmmQHETFrF9xdJnTYDdY6wfkANtzZV7Q=; b=ghZjuyMCSqi6r/mP067i7gCCgDQ8CIvlmDUdYveGV/ywVVimKDCeQ48DCqYYxQSjv9 iDNFglxfH3peOAoYUQPNAkiMHqAIm/FyhMAoxcQnurpZTvXzwm+YvCEBYam5e8nuO4DO WrPB7kyWF1cQoKHIr3ognTMQSkn3Z6j9z3vAbbFotbvg4H2H5EFrU7+uBHNjHD3B/F50 XentXKhlzSBPKX50y8DNOnd653kbzN5Fe5fdAVvx565On7xBqCG60bcAqXA6Ix+dmzGM m6sFFEExLUBhOWg/Y1v2SVbfCRQrV4/eRYbsYNY9yMkarE050yR98fHFteqEu+o1tLl+ br3w== 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=kiF3eDPsXk3VmmQHETFrF9xdJnTYDdY6wfkANtzZV7Q=; b=MaBlj2ErVdjlElsYhiZ/kwlGumHGJNYQr5NClYgOfITuaPC70Fjx0FQI1bupmwqlYS b9HOeRbAO/xBh1ScRZmIzV8WypeyUMXHNFE3wwpSvw6UqojLd2F3FU5bRQDlICD6jTiy sScuwda3BK108CFnyWdoi6ul/cwcDaS0nK4i6YwhfV+JXxNWgxu3sdNF6YVlbNLBmqcr 12juD6Z42d6dFcF4yLa3x5DGfCKJ7d3nbIiO6mA7EvRQpqck77y7qTdzc3gx5/xarmO/ i/uVSWh/+gFh9hQX5NPqNwWtx63/Sln9Le59u56u+bwNktQf45ZRbMYwAe4kOVCANVYx P7EQ== X-Gm-Message-State: AOAM532bZ8JXqkpJKtfHyiGNKnfXC4MvqdrnSI2HsrynBTq6fFyAj5GG Dy0YXo8j0NP9vYUZaLWDFzMjup6c X-Google-Smtp-Source: ABdhPJxM85T0FzOYq+u8F9o4EsXhOA/DjOfUfncdRKLbnKazJufGF2ZhCsN8URE01mtnSZ5QoFjk5g== X-Received: by 2002:a63:4d5a:: with SMTP id n26mr25014355pgl.85.1593043850074; Wed, 24 Jun 2020 17:10:50 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id n19sm17458671pgb.0.2020.06.24.17.10.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 17:10:49 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Andy Gross , Bjorn Andersson , Joerg Roedel , Thomas Gleixner , Jason Cooper , Marc Zyngier , Linus Walleij , Maulik Shah , Lina Iyer , Saravana Kannan , Todd Kjos , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, iommu@lists.linux-foundation.org, linux-gpio@vger.kernel.org Subject: [PATCH v2 5/5] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module Date: Thu, 25 Jun 2020 00:10:39 +0000 Message-Id: <20200625001039.56174-6-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200625001039.56174-1-john.stultz@linaro.org> References: <20200625001039.56174-1-john.stultz@linaro.org> Allow the qcom_scm driver to be loadable as a permenent module. Cc: Andy Gross Cc: Bjorn Andersson Cc: Joerg Roedel Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: Linus Walleij Cc: Maulik Shah Cc: Lina Iyer Cc: Saravana Kannan Cc: Todd Kjos Cc: Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org Cc: iommu@lists.linux-foundation.org Cc: linux-gpio@vger.kernel.org Signed-off-by: John Stultz --- drivers/firmware/Kconfig | 2 +- drivers/firmware/Makefile | 3 ++- drivers/firmware/qcom_scm.c | 4 ++++ drivers/iommu/Kconfig | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index fbd785dd0513..9e533a462bf4 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig @@ -236,7 +236,7 @@ config INTEL_STRATIX10_RSU Say Y here if you want Intel RSU support. config QCOM_SCM - bool + tristate "Qcom SCM driver" depends on ARM || ARM64 select RESET_CONTROLLER diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile index 99510be9f5ed..cf24d674216b 100644 --- a/drivers/firmware/Makefile +++ b/drivers/firmware/Makefile @@ -17,7 +17,8 @@ obj-$(CONFIG_ISCSI_IBFT) += iscsi_ibft.o obj-$(CONFIG_FIRMWARE_MEMMAP) += memmap.o obj-$(CONFIG_RASPBERRYPI_FIRMWARE) += raspberrypi.o obj-$(CONFIG_FW_CFG_SYSFS) += qemu_fw_cfg.o -obj-$(CONFIG_QCOM_SCM) += qcom_scm.o qcom_scm-smc.o qcom_scm-legacy.o +obj-$(CONFIG_QCOM_SCM) += qcom-scm.o +qcom-scm-objs += qcom_scm.o qcom_scm-smc.o qcom_scm-legacy.o obj-$(CONFIG_TI_SCI_PROTOCOL) += ti_sci.o obj-$(CONFIG_TRUSTED_FOUNDATIONS) += trusted_foundations.o obj-$(CONFIG_TURRIS_MOX_RWTM) += turris-mox-rwtm.o diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index 0e7233a20f34..b5e88bf66975 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -1155,6 +1155,7 @@ static const struct of_device_id qcom_scm_dt_match[] = { { .compatible = "qcom,scm" }, {} }; +MODULE_DEVICE_TABLE(of, qcom_scm_dt_match); static struct platform_driver qcom_scm_driver = { .driver = { @@ -1170,3 +1171,6 @@ static int __init qcom_scm_init(void) return platform_driver_register(&qcom_scm_driver); } subsys_initcall(qcom_scm_init); + +MODULE_DESCRIPTION("Qualcomm Technologies, Inc. SCM driver"); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index b510f67dfa49..714893535dd2 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -381,6 +381,7 @@ config SPAPR_TCE_IOMMU config ARM_SMMU tristate "ARM Ltd. System MMU (SMMU) Support" depends on (ARM64 || ARM || (COMPILE_TEST && !GENERIC_ATOMIC64)) && MMU + depends on QCOM_SCM || !QCOM_SCM #if QCOM_SCM=m this can't be =y select IOMMU_API select IOMMU_IO_PGTABLE_LPAE select ARM_DMA_USE_IOMMU if ARM @@ -500,6 +501,7 @@ config QCOM_IOMMU # Note: iommu drivers cannot (yet?) be built as modules bool "Qualcomm IOMMU Support" depends on ARCH_QCOM || (COMPILE_TEST && !GENERIC_ATOMIC64) + depends on QCOM_SCM=y select IOMMU_API select IOMMU_IO_PGTABLE_LPAE select ARM_DMA_USE_IOMMU