iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] iommu/mediatek-v1: Alloc building as module
@ 2021-03-23  5:58 Yong Wu
  2021-03-23  5:58 ` [PATCH 2/2] iommu/mediatek: " Yong Wu
  2021-03-25 17:16 ` [PATCH 1/2] iommu/mediatek-v1: " Will Deacon
  0 siblings, 2 replies; 4+ messages in thread
From: Yong Wu @ 2021-03-23  5:58 UTC (permalink / raw)
  To: Joerg Roedel, Matthias Brugger, Will Deacon
  Cc: youlin.pei, anan.sun, Nicolas Boichat, srv_heupstream,
	linux-kernel, Krzysztof Kozlowski, chao.hao, iommu,
	linux-mediatek, Tomasz Figa, Robin Murphy, linux-arm-kernel

This patch only adds support for building the IOMMU-v1 driver as module.
Correspondingly switch the config to tristate.

Signed-off-by: Yong Wu <yong.wu@mediatek.com>
---
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 <linux/iommu.h>
 #include <linux/iopoll.h>
 #include <linux/list.h>
+#include <linux/module.h>
 #include <linux/of_address.h>
 #include <linux/of_iommu.h>
 #include <linux/of_irq.h>
@@ -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

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-25 17:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23  5:58 [PATCH 1/2] iommu/mediatek-v1: Alloc building as module Yong Wu
2021-03-23  5:58 ` [PATCH 2/2] iommu/mediatek: " Yong Wu
2021-03-25 17:16 ` [PATCH 1/2] iommu/mediatek-v1: " Will Deacon
2021-03-25 17:42   ` Robin Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).