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>
This commit is contained in:
parent
94e9dd43cf
commit
50fc8d9232
@ -173,7 +173,7 @@ config JZ4780_NEMC
|
|||||||
memory devices such as NAND and SRAM.
|
memory devices such as NAND and SRAM.
|
||||||
|
|
||||||
config MTK_SMI
|
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
|
depends on ARCH_MEDIATEK || COMPILE_TEST
|
||||||
help
|
help
|
||||||
This driver is for the Memory Controller module in MediaTek SoCs,
|
This driver is for the Memory Controller module in MediaTek SoCs,
|
||||||
|
@ -597,3 +597,12 @@ static int __init mtk_smi_init(void)
|
|||||||
return platform_register_drivers(smidrivers, ARRAY_SIZE(smidrivers));
|
return platform_register_drivers(smidrivers, ARRAY_SIZE(smidrivers));
|
||||||
}
|
}
|
||||||
module_init(mtk_smi_init);
|
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/bitops.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
|
||||||
#ifdef CONFIG_MTK_SMI
|
#if IS_ENABLED(CONFIG_MTK_SMI)
|
||||||
|
|
||||||
#define MTK_LARB_NR_MAX 16
|
#define MTK_LARB_NR_MAX 16
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user