* [PATCH v2] memory: mtk-smi: Support SMI modular
@ 2021-01-26 6:00 Yong Wu
2021-01-26 19:49 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: Yong Wu @ 2021-01-26 6:00 UTC (permalink / raw)
To: Krzysztof Kozlowski, Matthias Brugger
Cc: youlin.pei, anan.sun, Nicolas Boichat, srv_heupstream,
Robin Murphy, Joerg Roedel, linux-kernel, yi.kuo, Tomasz Figa,
iommu, linux-mediatek, yong.wu, Will Deacon, linux-arm-kernel
This patch mainly support SMI modular. Switch MTK_SMI to tristate,
and add module_exit/module_license.
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
---
This patch rebase on the clean v5.11-rc1.
and this one: memory: mtk-smi: Use platform_register_drivers
https://lore.kernel.org/linux-arm-kernel/20210121062429.26504-2-yong.wu@mediatek.com/
change note:
a) squash the last two of v1 into one patch.
b) Remove module_alias
---
drivers/memory/Kconfig | 2 +-
drivers/memory/mtk-smi.c | 9 +++++++++
include/soc/mediatek/smi.h | 2 +-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
index 3ea6913df176..05c6d4a32285 100644
--- a/drivers/memory/Kconfig
+++ b/drivers/memory/Kconfig
@@ -173,7 +173,7 @@ config JZ4780_NEMC
memory devices such as NAND and SRAM.
config MTK_SMI
- bool "Mediatek SoC Memory Controller driver" if COMPILE_TEST
+ tristate "MediaTek SoC Memory Controller driver" if COMPILE_TEST
depends on ARCH_MEDIATEK || COMPILE_TEST
help
This driver is for the Memory Controller module in MediaTek SoCs,
diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c
index e2aebd2bfa8e..3a269415db73 100644
--- a/drivers/memory/mtk-smi.c
+++ b/drivers/memory/mtk-smi.c
@@ -597,3 +597,12 @@ static int __init mtk_smi_init(void)
return platform_register_drivers(smidrivers, ARRAY_SIZE(smidrivers));
}
module_init(mtk_smi_init);
+
+static void __exit mtk_smi_exit(void)
+{
+ platform_unregister_drivers(smidrivers, ARRAY_SIZE(smidrivers));
+}
+module_exit(mtk_smi_exit);
+
+MODULE_DESCRIPTION("MediaTek SMI driver");
+MODULE_LICENSE("GPL v2");
diff --git a/include/soc/mediatek/smi.h b/include/soc/mediatek/smi.h
index 5a34b87d89e3..29e2fb8f33d6 100644
--- a/include/soc/mediatek/smi.h
+++ b/include/soc/mediatek/smi.h
@@ -9,7 +9,7 @@
#include <linux/bitops.h>
#include <linux/device.h>
-#ifdef CONFIG_MTK_SMI
+#if IS_ENABLED(CONFIG_MTK_SMI)
#define MTK_LARB_NR_MAX 16
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] memory: mtk-smi: Support SMI modular
2021-01-26 6:00 [PATCH v2] memory: mtk-smi: Support SMI modular Yong Wu
@ 2021-01-26 19:49 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2021-01-26 19:49 UTC (permalink / raw)
To: Yong Wu
Cc: youlin.pei, anan.sun, Nicolas Boichat, srv_heupstream,
Robin Murphy, Joerg Roedel, linux-kernel, yi.kuo, Tomasz Figa,
iommu, linux-mediatek, Matthias Brugger, Will Deacon,
linux-arm-kernel
On Tue, Jan 26, 2021 at 02:00:55PM +0800, Yong Wu wrote:
> This patch mainly support SMI modular. Switch MTK_SMI to tristate,
> and add module_exit/module_license.
>
> Signed-off-by: Yong Wu <yong.wu@mediatek.com>
> ---
> This patch rebase on the clean v5.11-rc1.
> and this one: memory: mtk-smi: Use platform_register_drivers
> https://lore.kernel.org/linux-arm-kernel/20210121062429.26504-2-yong.wu@mediatek.com/
>
> change note:
> a) squash the last two of v1 into one patch.
> b) Remove module_alias
> ---
> drivers/memory/Kconfig | 2 +-
> drivers/memory/mtk-smi.c | 9 +++++++++
> include/soc/mediatek/smi.h | 2 +-
> 3 files changed, 11 insertions(+), 2 deletions(-)
Thanks, applied with slightly adjusted commit msg and subject.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-26 19:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-26 6:00 [PATCH v2] memory: mtk-smi: Support SMI modular Yong Wu
2021-01-26 19:49 ` Krzysztof Kozlowski
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).