Commit 870ed5e2 authored by Anson Huang's avatar Anson Huang Committed by Shawn Guo
Browse files

clk: imx: Support building i.MX common clock driver as module



There are more and more requirements of building SoC specific drivers
as modules, add support for building i.MX common clock driver as module
to meet the requirement.

Signed-off-by: default avatarAnson Huang <Anson.Huang@nxp.com>
Reviewed-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent d7d7518f
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
# common clock support for NXP i.MX SoC family.
config MXC_CLK
	bool
	def_bool ARCH_MXC
	tristate "IMX clock"
	depends on ARCH_MXC

config MXC_CLK_SCU
	bool
@@ -11,24 +11,28 @@ config MXC_CLK_SCU
config CLK_IMX8MM
	bool "IMX8MM CCM Clock Driver"
	depends on ARCH_MXC
	select MXC_CLK
	help
	    Build the driver for i.MX8MM CCM Clock Driver

config CLK_IMX8MN
	bool "IMX8MN CCM Clock Driver"
	depends on ARCH_MXC
	select MXC_CLK
	help
	    Build the driver for i.MX8MN CCM Clock Driver

config CLK_IMX8MP
	bool "IMX8MP CCM Clock Driver"
	depends on ARCH_MXC
	select MXC_CLK
	help
	    Build the driver for i.MX8MP CCM Clock Driver

config CLK_IMX8MQ
	bool "IMX8MQ CCM Clock Driver"
	depends on ARCH_MXC
	select MXC_CLK
	help
	    Build the driver for i.MX8MQ CCM Clock Driver

+20 −20
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_MXC_CLK) += \
	clk.o \
	clk-busy.o \
	clk-composite-8m.o \
	clk-cpu.o \
	clk-composite-7ulp.o \
	clk-divider-gate.o \
	clk-fixup-div.o \
	clk-fixup-mux.o \
	clk-frac-pll.o \
	clk-gate-exclusive.o \
	clk-gate2.o \
	clk-pfd.o \
	clk-pfdv2.o \
	clk-pllv1.o \
	clk-pllv2.o \
	clk-pllv3.o \
	clk-pllv4.o \
	clk-sscg-pll.o \
	clk-pll14xx.o
mxc-clk-objs += clk.o
mxc-clk-objs += clk-busy.o
mxc-clk-objs += clk-composite-7ulp.o
mxc-clk-objs += clk-composite-8m.o
mxc-clk-objs += clk-cpu.o
mxc-clk-objs += clk-divider-gate.o
mxc-clk-objs += clk-fixup-div.o
mxc-clk-objs += clk-fixup-mux.o
mxc-clk-objs += clk-frac-pll.o
mxc-clk-objs += clk-gate2.o
mxc-clk-objs += clk-gate-exclusive.o
mxc-clk-objs += clk-pfd.o
mxc-clk-objs += clk-pfdv2.o
mxc-clk-objs += clk-pllv1.o
mxc-clk-objs += clk-pllv2.o
mxc-clk-objs += clk-pllv3.o
mxc-clk-objs += clk-pllv4.o
mxc-clk-objs += clk-pll14xx.o
mxc-clk-objs += clk-sscg-pll.o
obj-$(CONFIG_MXC_CLK) += mxc-clk.o

obj-$(CONFIG_MXC_CLK_SCU) += \
	clk-scu.o \
+2 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@

#include <linux/clk-provider.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/io.h>
#include <linux/slab.h>

@@ -243,3 +244,4 @@ fail:
	kfree(mux);
	return ERR_CAST(hw);
}
EXPORT_SYMBOL_GPL(imx8m_clk_hw_composite_flags);
+2 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@

#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/export.h>
#include <linux/slab.h>
#include "clk.h"

@@ -104,3 +105,4 @@ struct clk_hw *imx_clk_hw_cpu(const char *name, const char *parent_name,

	return hw;
}
EXPORT_SYMBOL_GPL(imx_clk_hw_cpu);
+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@

#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/export.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/slab.h>
@@ -233,3 +234,4 @@ struct clk_hw *imx_clk_hw_frac_pll(const char *name,

	return hw;
}
EXPORT_SYMBOL_GPL(imx_clk_hw_frac_pll);
Loading