From patchwork Thu Jun 25 00:10:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 194565 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E39EFC433E1 for ; Thu, 25 Jun 2020 00:10:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BDA93207E8 for ; Thu, 25 Jun 2020 00:10:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rOF1Yhix" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388685AbgFYAKq (ORCPT ); Wed, 24 Jun 2020 20:10:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388674AbgFYAKp (ORCPT ); Wed, 24 Jun 2020 20:10:45 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65F5BC061795 for ; Wed, 24 Jun 2020 17:10:45 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id d6so2137673pjs.3 for ; Wed, 24 Jun 2020 17:10:45 -0700 (PDT) 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=qCGYxi6L0dmDdYzHShkkSHiKc6T34aWWoWuQkkFnaWU=; b=rOF1YhixiSD8M50+j5CiMzpdohF2arfJt6iyO3UNYlYzhcfBE1/ym4B6dvjJpTZQXZ zNVl2oHPobEbAf/+XE2fkhaKapUULh2NUBFuLnvMJpyrqa8xhuu4qGqnVEr92Hp1cXAH QQaYRDNL3+IxM2eAoostdDGI9aTtunbnEzAclrm8dcD0BhYaha73Pc10WKlQIrMw4nxg 75l1QGAhHoBHeSHNEKMgI82S4ZsIAl9YBGDMdZeoKr7tX9q0TN//+8jFTFf9KrKkZQYF OuDtsKWUUZAau3d1SAJhBktN2QePVibBmLBb7cygtwzBQmNZ/HXDf1LYhCdnotpzASWL PR/w== 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=qCGYxi6L0dmDdYzHShkkSHiKc6T34aWWoWuQkkFnaWU=; b=FDm6IaqkakBpGq3dAWX06dpz9YFSBc6+N/xl6ugONMxZaZv71MG2E9IwiL0o6UJdXW +oUXVE0GQxkAZSklkXB6vZxu7MLgs5em4LGI5i+PnbX0b7Aypfor2/TnilPxAGmEOO11 8ms9ePBKjsatM0J0JZyIHWPRBdoCyUZUYWIHXGOpfqIpPoEBtStL6ueFfptumyqEmSRz czUBQEtULkCSdVZxL1GIr3naLT2Nk9SO2d58ECgWEVcu1DE13Pkwe7EO1UMUCUZPSshC 7b5CCelZ+KxpjI2cwMoBuC8KZ5TD6M8aD4C4xsWKe0jjqDg1X0apxzCpXqvmYr3mveRG kkpQ== X-Gm-Message-State: AOAM533OXuc6OFNn1mAy2MGqh/mtJ6xajSOK7kAW0JFgsmBTumCHSaIn bZy4ixvasGPhUc4m+NYS4YAgqw== X-Google-Smtp-Source: ABdhPJxGeqEMqjAA50eBDK/+kqthZdDuh3xyYY2kWfjMLxc1bNitFm5ktScRYkrsfEUgv5rN5ZagFQ== X-Received: by 2002:a17:90a:1781:: with SMTP id q1mr392515pja.8.1593043844977; Wed, 24 Jun 2020 17:10:44 -0700 (PDT) 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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 17:10:44 -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 1/5] irq: irqdomain: Export irq_domain_update_bus_token Date: Thu, 25 Jun 2020 00:10:35 +0000 Message-Id: <20200625001039.56174-2-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> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add export for irq_domain_update_bus_token() so that we can allow drivers like the qcom-pdc driver to be loadable as a 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 --- kernel/irq/irqdomain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index a4c2c915511d..ca974d965fda 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -281,6 +281,7 @@ void irq_domain_update_bus_token(struct irq_domain *domain, mutex_unlock(&irq_domain_mutex); } +EXPORT_SYMBOL_GPL(irq_domain_update_bus_token); /** * irq_domain_add_simple() - Register an irq_domain and optionally map a range of irqs From patchwork Thu Jun 25 00:10:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 194563 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAFEBC433E1 for ; Thu, 25 Jun 2020 00:11:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8033A2078D for ; Thu, 25 Jun 2020 00:11:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="iy2r5e1b" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388845AbgFYALB (ORCPT ); Wed, 24 Jun 2020 20:11:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388697AbgFYAKs (ORCPT ); Wed, 24 Jun 2020 20:10:48 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E95B9C061799 for ; Wed, 24 Jun 2020 17:10:47 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id f2so1904503plr.8 for ; Wed, 24 Jun 2020 17:10:47 -0700 (PDT) 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=1BQGhEnOTLcAnkOD6cOIMtUwarBXYNy82wKDCDvtQ90=; b=iy2r5e1by3FC0GuBVTzvABwS1sD4L47z2FyOAtuRL5Nw4HSH7OnFvlk/D6A4mFIYFr r89IOmbNP/6C05wgPfM7ACNRmBaRJ/e2ia2g+EIA4Ej5K3IE4c1uBqd90U0mEnbQ2hoO 3VIavoCGYFVVjdBivRpG5i1uf1uEvt2eAEPRzkjB5FNpCjigxCV2y80rpo0qZSFhuWHA mEDDBcY4xInnbBSOa08upCkelmx6fzp7w2DO+Byrtx7O+hcgLnviBGoVmbuusHwQerqo 5XujoVtjN5X3htlhxMhTDYFJ87eeowerl8cx9iCtGDZhU4NNpCkYmSBUCyNIWcoBMWyi HxDg== 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=1BQGhEnOTLcAnkOD6cOIMtUwarBXYNy82wKDCDvtQ90=; b=WXU/9Drrm3f6l1eJ3TXN9tKXCOt5DHO1msKdLb69KcW6anhowoaQFls1G1mPsFP8ed +06TQTkhNVIwZSonjaaYp4yKjO6DAXId6Orn7654UOFlfq9xFArfyoVnBG8Yr1uIY2Nx esI6OwX1o6XsArhxKwrr2g+Mr4JYsx0+w4QTmNW1illWlxyg1ckW/tI+Tw+yPUknH1j9 3CRK9ZuB1neHPsoVbEkMTtCm1KNjRLkgm4qYiaac8wRfOdqoPEyuYYp99wcAWmCB+pKU 5BkD9uriVGGVMFkiB70zAwKqYyF8xh7WXAhxtML8VQCa3agJ5gh8qKjJ4dvemksjK6IE XVHQ== X-Gm-Message-State: AOAM5318rEAFiJqF3ypzEEZ8bbR9njYeM3zdJ6Z2b7VxmLYoNB5YgYu5 90QHyUjCTQ+gJmKkcKcWrfMVVA== X-Google-Smtp-Source: ABdhPJwDz2x/LmmZ4ChNgREsOBxp8f5ux0cChEqCx9b9fuxljjxzHtStIMBHmJqrHRJUwaMRnpVWew== X-Received: by 2002:a17:902:a585:: with SMTP id az5mr30012995plb.207.1593043847478; Wed, 24 Jun 2020 17:10:47 -0700 (PDT) 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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 17:10:47 -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 3/5] irqchip: Allow QCOM_PDC to be loadable as a permanent module Date: Thu, 25 Jun 2020 00:10:37 +0000 Message-Id: <20200625001039.56174-4-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> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Allows qcom-pdc driver to be loaded as a permanent module Also, due to the fact that IRQCHIP_DECLARE becomes a no-op when building as a module, we have to add the platform driver hooks explicitly. Thanks to Saravana for his help on pointing out the IRQCHIP_DECLARE issue and guidance on a solution. 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 --- v2: Fix spelling, include order and set suppress_bind_attrs suggested by Maulik Shah --- drivers/irqchip/Kconfig | 2 +- drivers/irqchip/qcom-pdc.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index 29fead208cad..12765bed08f9 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -425,7 +425,7 @@ config GOLDFISH_PIC for Goldfish based virtual platforms. config QCOM_PDC - bool "QCOM PDC" + tristate "QCOM PDC" depends on ARCH_QCOM select IRQ_DOMAIN_HIERARCHY help diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c index 6ae9e1f0819d..3fee8b655da1 100644 --- a/drivers/irqchip/qcom-pdc.c +++ b/drivers/irqchip/qcom-pdc.c @@ -11,9 +11,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -430,4 +432,33 @@ static int qcom_pdc_init(struct device_node *node, struct device_node *parent) return ret; } +#ifdef MODULE +static int qcom_pdc_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; + struct device_node *parent = of_irq_find_parent(np); + + return qcom_pdc_init(np, parent); +} + +static const struct of_device_id qcom_pdc_match_table[] = { + { .compatible = "qcom,pdc" }, + {} +}; +MODULE_DEVICE_TABLE(of, qcom_pdc_match_table); + +static struct platform_driver qcom_pdc_driver = { + .probe = qcom_pdc_probe, + .driver = { + .name = "qcom-pdc", + .of_match_table = qcom_pdc_match_table, + .suppress_bind_attrs = true, + }, +}; +module_platform_driver(qcom_pdc_driver); +#else IRQCHIP_DECLARE(qcom_pdc, "qcom,pdc", qcom_pdc_init); +#endif + +MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Power Domain Controller"); +MODULE_LICENSE("GPL v2"); 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: 194564 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F62BC433E1 for ; Thu, 25 Jun 2020 00:11:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B08C20836 for ; Thu, 25 Jun 2020 00:11:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ghZjuyMC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388686AbgFYAKz (ORCPT ); Wed, 24 Jun 2020 20:10:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388759AbgFYAKu (ORCPT ); Wed, 24 Jun 2020 20:10:50 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84D8FC0617BA for ; Wed, 24 Jun 2020 17:10:50 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id 207so1912233pfu.3 for ; Wed, 24 Jun 2020 17:10:50 -0700 (PDT) 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=rt5OhaoCfm2J7qamHsya0jUz83ZJfTabqx3w6hMaTKbHeznZBpKVmFTZu84g9u5ct9 GmA3p5D/X2I4k5+jjlIyGz2rGyQ0VSVREnYnCzXBSY1aT5Uyqd8ZEunnbJ6BG0mBk9iX XtedDt2tnNWecihKG9jhtKRRlYOrvmSxWosYqHt22EEAlGPbsPNnR25Ylxevg8EPPC4Z D4fX1LSgZvBBlb63xYIoagzY090e0FTiDQEGzOTOC8JqCAZBZoul0nyTzI8ZUtzq3vPS 7FLEeisfCw0KtsfBLdV7Ieep6VuTDL0Cgkbq+kiTW+xDYXTSFu3K5cHqrp2iEjitdoyE 0K1g== X-Gm-Message-State: AOAM5308F18oB2pz+KE840ONhqBTjVvfWSUPEsGp+OT8MDtNyGJfdOkj LHx6Kip9KluGmjNuikfMSh2JvA== 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) 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> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.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(-) 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