Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3992686pxf; Mon, 22 Mar 2021 23:00:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDWIYLKQnF42JWmrl6RvC/Iybs3raez74YZuwukIWjZZqHPSLzivVvlAjHNeMsafhjbq0X X-Received: by 2002:a17:907:94cc:: with SMTP id dn12mr3206718ejc.177.1616479228462; Mon, 22 Mar 2021 23:00:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616479228; cv=none; d=google.com; s=arc-20160816; b=Es74plhaiHh+1ZQTt/67tG/EyfEyJbIRaCDTWlwIeV4Fs+lxQI+DyyqdgA60ppww59 Sa7QhEzJAaGDiE0dRzd8qpuUXh9XCa9sYIFLPgU/0cUf/ls5obDcClJENsMoN24es8dP 20FWWkWiZvg1NUY4QlgrASZKuYiA/3gIx0Bd/8PXnBUVDjjp8e5ALmPVI3PbK46IHOLP iuXRDlJjqPwdZi0lHEYE2Rb3tQVjuMGeL3GYxTgfczjPEs7ZxNTGk3O0S9j2AAhVYHE6 8sp2GROIjb+vZ9e1z0kX6edY6pJPE8qP4mo4e8BoCvjresva0h6G6Dl+IJ8Fc1CwdYfF +8IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=thOf0vXvAlteFHPVgurt4KVtCJgfy/oOWA3hAireV0Q=; b=gpZLRX794j/EOKTpbSUd4kQ1bP5GdFeNdwdy78TANI0Lxlw/vxnco5yayK0gMOE6po 2shcyKlNQf9se3kyWgJrqcBmWJnDii+snAvXSpHZceesqOkuybK4hVhg5Lhnfas1vcud 1H4f43MwLsOi/FMn/bb98B2Gk55rfKvHw0mstsfy8I8IK4EITKfNOpDHXtyEIF5Ki8rI 1cjmX0rzHTdjq25rt4WaPz90mDNjachqcw9erbPgPO81UpchUt3RMB1m9KiRVkMZhwGP tUrdOPSSm1ApcNsANXaf0khSrqcv+WGqOoo3ASsDOns7YfVLIc2c2rndVUkTETOenf9G 6N3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c18si12400825ejr.332.2021.03.22.23.00.05; Mon, 22 Mar 2021 23:00:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229451AbhCWF6P (ORCPT + 99 others); Tue, 23 Mar 2021 01:58:15 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:59937 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229904AbhCWF6K (ORCPT ); Tue, 23 Mar 2021 01:58:10 -0400 X-UUID: 130c39ac86e84e91b16636f38ebe63a4-20210323 X-UUID: 130c39ac86e84e91b16636f38ebe63a4-20210323 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 375069684; Tue, 23 Mar 2021 13:58:09 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 23 Mar 2021 13:58:07 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 23 Mar 2021 13:58:06 +0800 From: Yong Wu To: Joerg Roedel , Matthias Brugger , Will Deacon CC: Robin Murphy , Tomasz Figa , , , , , , Krzysztof Kozlowski , , , Nicolas Boichat , , Subject: [PATCH 1/2] iommu/mediatek-v1: Alloc building as module Date: Tue, 23 Mar 2021 13:58:00 +0800 Message-ID: <20210323055801.16885-1-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch only adds support for building the IOMMU-v1 driver as module. Correspondingly switch the config to tristate. Signed-off-by: Yong Wu --- rebase on v5.12-rc2. --- drivers/iommu/Kconfig | 2 +- drivers/iommu/mtk_iommu_v1.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index 192ef8f61310..bc93da48bed0 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -364,7 +364,7 @@ config MTK_IOMMU If unsure, say N here. config MTK_IOMMU_V1 - bool "MTK IOMMU Version 1 (M4U gen1) Support" + tristate "MediaTek IOMMU Version 1 (M4U gen1) Support" depends on ARM depends on ARCH_MEDIATEK || COMPILE_TEST select ARM_DMA_USE_IOMMU diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c index 82ddfe9170d4..71370037083a 100644 --- a/drivers/iommu/mtk_iommu_v1.c +++ b/drivers/iommu/mtk_iommu_v1.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -691,9 +692,7 @@ static struct platform_driver mtk_iommu_driver = { .pm = &mtk_iommu_pm_ops, } }; +module_platform_driver(mtk_iommu_driver); -static int __init m4u_init(void) -{ - return platform_driver_register(&mtk_iommu_driver); -} -subsys_initcall(m4u_init); +MODULE_DESCRIPTION("IOMMU API for MediaTek M4U v1 implementations"); +MODULE_LICENSE("GPL v2"); -- 2.18.0