mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
UPSTREAM: memory: mtk-smi: Allow building as module
Add support for building the SMI driver as module. Switch MTK_SMI to
tristate, and add module_exit/module_license.
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20210126060055.11050-1-yong.wu@mediatek.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
(cherry picked from commit 50fc8d9232)
BUG=b:174513569
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Change-Id: I6d4c9e14304d6d42e4a1e8ef441ae8591495b2df
This commit is contained in:
parent
ea79f21727
commit
1a0226d0f3
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -605,3 +605,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");
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <linux/bitops.h>
|
||||
#include <linux/device.h>
|
||||
|
||||
#ifdef CONFIG_MTK_SMI
|
||||
#if IS_ENABLED(CONFIG_MTK_SMI)
|
||||
|
||||
#define MTK_SMI_MMU_EN(port) BIT(port)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user