@@ -5,7 +5,7 @@ config MXC_CLK
def_bool ARCH_MXC
config MXC_CLK_SCU
- bool
+ tristate "IMX SCU clock"
depends on IMX_SCU
config CLK_IMX8MM
@@ -21,9 +21,8 @@ obj-$(CONFIG_MXC_CLK) += \
clk-sscg-pll.o \
clk-pll14xx.o
-obj-$(CONFIG_MXC_CLK_SCU) += \
- clk-scu.o \
- clk-lpcg-scu.o
+mxc-clk-scu-objs += clk-scu.o clk-lpcg-scu.o
+obj-$(CONFIG_MXC_CLK_SCU) += mxc-clk-scu.o
obj-$(CONFIG_CLK_IMX8MM) += clk-imx8mm.o
obj-$(CONFIG_CLK_IMX8MN) += clk-imx8mn.o
@@ -8,6 +8,7 @@
#include <linux/arm-smccc.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
+#include <linux/module.h>
#include <linux/slab.h>
#include "clk-scu.h"
@@ -132,6 +133,7 @@ int imx_clk_scu_init(void)
{
return imx_scu_get_handle(&ccm_ipc_handle);
}
+EXPORT_SYMBOL_GPL(imx_clk_scu_init);
/*
* clk_scu_recalc_rate - Get clock rate for a SCU clock
@@ -387,3 +389,6 @@ struct clk_hw *__imx_clk_scu(const char *name, const char * const *parents,
return hw;
}
+EXPORT_SYMBOL_GPL(__imx_clk_scu);
+
+MODULE_LICENSE("GPL v2");
There are more and more requirements of building SoC specific drivers as modules, add support for building SCU clock driver as module to meet the requirement. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> --- drivers/clk/imx/Kconfig | 2 +- drivers/clk/imx/Makefile | 5 ++--- drivers/clk/imx/clk-scu.c | 5 +++++ 3 files changed, 8 insertions(+), 4 deletions(-)