Commit 32b028fb authored by Miles Chen's avatar Miles Chen Committed by Stephen Boyd

clk: mediatek: support COMMON_CLK_MEDIATEK module build

To support COMMON_CLK_MEDIATEK module build,
add MODULE_LICENSE and export necessary symbols.

Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Hanks Chen <hanks.chen@mediatek.com>
Cc: Wendell Lin <wendell.lin@mediatek.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarMiles Chen <miles.chen@mediatek.com>
Link: https://lore.kernel.org/r/20210901222526.31065-3-miles.chen@mediatek.comSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 7c971695
...@@ -6,7 +6,7 @@ menu "Clock driver for MediaTek SoC" ...@@ -6,7 +6,7 @@ menu "Clock driver for MediaTek SoC"
depends on ARCH_MEDIATEK || COMPILE_TEST depends on ARCH_MEDIATEK || COMPILE_TEST
config COMMON_CLK_MEDIATEK config COMMON_CLK_MEDIATEK
bool tristate
select RESET_CONTROLLER select RESET_CONTROLLER
help help
MediaTek SoCs' clock support. MediaTek SoCs' clock support.
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
*/ */
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/module.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -97,3 +98,5 @@ struct clk * __init mtk_clk_register_ref2usb_tx(const char *name, ...@@ -97,3 +98,5 @@ struct clk * __init mtk_clk_register_ref2usb_tx(const char *name,
return clk; return clk;
} }
MODULE_LICENSE("GPL");
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include <linux/mfd/syscon.h> #include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/slab.h> #include <linux/slab.h>
#include "clk-mtk.h" #include "clk-mtk.h"
...@@ -106,3 +107,5 @@ int mtk_clk_register_cpumuxes(struct device_node *node, ...@@ -106,3 +107,5 @@ int mtk_clk_register_cpumuxes(struct device_node *node,
return 0; return 0;
} }
MODULE_LICENSE("GPL");
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/clkdev.h> #include <linux/clkdev.h>
#include <linux/module.h>
#include "clk-mtk.h" #include "clk-mtk.h"
#include "clk-gate.h" #include "clk-gate.h"
...@@ -122,24 +123,28 @@ const struct clk_ops mtk_clk_gate_ops_setclr = { ...@@ -122,24 +123,28 @@ const struct clk_ops mtk_clk_gate_ops_setclr = {
.enable = mtk_cg_enable, .enable = mtk_cg_enable,
.disable = mtk_cg_disable, .disable = mtk_cg_disable,
}; };
EXPORT_SYMBOL_GPL(mtk_clk_gate_ops_setclr);
const struct clk_ops mtk_clk_gate_ops_setclr_inv = { const struct clk_ops mtk_clk_gate_ops_setclr_inv = {
.is_enabled = mtk_cg_bit_is_set, .is_enabled = mtk_cg_bit_is_set,
.enable = mtk_cg_enable_inv, .enable = mtk_cg_enable_inv,
.disable = mtk_cg_disable_inv, .disable = mtk_cg_disable_inv,
}; };
EXPORT_SYMBOL_GPL(mtk_clk_gate_ops_setclr_inv);
const struct clk_ops mtk_clk_gate_ops_no_setclr = { const struct clk_ops mtk_clk_gate_ops_no_setclr = {
.is_enabled = mtk_cg_bit_is_cleared, .is_enabled = mtk_cg_bit_is_cleared,
.enable = mtk_cg_enable_no_setclr, .enable = mtk_cg_enable_no_setclr,
.disable = mtk_cg_disable_no_setclr, .disable = mtk_cg_disable_no_setclr,
}; };
EXPORT_SYMBOL_GPL(mtk_clk_gate_ops_no_setclr);
const struct clk_ops mtk_clk_gate_ops_no_setclr_inv = { const struct clk_ops mtk_clk_gate_ops_no_setclr_inv = {
.is_enabled = mtk_cg_bit_is_set, .is_enabled = mtk_cg_bit_is_set,
.enable = mtk_cg_enable_inv_no_setclr, .enable = mtk_cg_enable_inv_no_setclr,
.disable = mtk_cg_disable_inv_no_setclr, .disable = mtk_cg_disable_inv_no_setclr,
}; };
EXPORT_SYMBOL_GPL(mtk_clk_gate_ops_no_setclr_inv);
struct clk *mtk_clk_register_gate( struct clk *mtk_clk_register_gate(
const char *name, const char *name,
...@@ -181,3 +186,6 @@ struct clk *mtk_clk_register_gate( ...@@ -181,3 +186,6 @@ struct clk *mtk_clk_register_gate(
return clk; return clk;
} }
EXPORT_SYMBOL_GPL(mtk_clk_register_gate);
MODULE_LICENSE("GPL");
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/clkdev.h> #include <linux/clkdev.h>
#include <linux/module.h>
#include <linux/mfd/syscon.h> #include <linux/mfd/syscon.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/of_device.h> #include <linux/of_device.h>
...@@ -42,6 +43,7 @@ struct clk_onecell_data *mtk_alloc_clk_data(unsigned int clk_num) ...@@ -42,6 +43,7 @@ struct clk_onecell_data *mtk_alloc_clk_data(unsigned int clk_num)
return NULL; return NULL;
} }
EXPORT_SYMBOL_GPL(mtk_alloc_clk_data);
void mtk_free_clk_data(struct clk_onecell_data *clk_data) void mtk_free_clk_data(struct clk_onecell_data *clk_data)
{ {
...@@ -77,6 +79,7 @@ void mtk_clk_register_fixed_clks(const struct mtk_fixed_clk *clks, ...@@ -77,6 +79,7 @@ void mtk_clk_register_fixed_clks(const struct mtk_fixed_clk *clks,
clk_data->clks[rc->id] = clk; clk_data->clks[rc->id] = clk;
} }
} }
EXPORT_SYMBOL_GPL(mtk_clk_register_fixed_clks);
void mtk_clk_register_factors(const struct mtk_fixed_factor *clks, void mtk_clk_register_factors(const struct mtk_fixed_factor *clks,
int num, struct clk_onecell_data *clk_data) int num, struct clk_onecell_data *clk_data)
...@@ -103,6 +106,7 @@ void mtk_clk_register_factors(const struct mtk_fixed_factor *clks, ...@@ -103,6 +106,7 @@ void mtk_clk_register_factors(const struct mtk_fixed_factor *clks,
clk_data->clks[ff->id] = clk; clk_data->clks[ff->id] = clk;
} }
} }
EXPORT_SYMBOL_GPL(mtk_clk_register_factors);
int mtk_clk_register_gates_with_dev(struct device_node *node, int mtk_clk_register_gates_with_dev(struct device_node *node,
const struct mtk_gate *clks, const struct mtk_gate *clks,
...@@ -155,6 +159,7 @@ int mtk_clk_register_gates(struct device_node *node, ...@@ -155,6 +159,7 @@ int mtk_clk_register_gates(struct device_node *node,
return mtk_clk_register_gates_with_dev(node, return mtk_clk_register_gates_with_dev(node,
clks, num, clk_data, NULL); clks, num, clk_data, NULL);
} }
EXPORT_SYMBOL_GPL(mtk_clk_register_gates);
struct clk *mtk_clk_register_composite(const struct mtk_composite *mc, struct clk *mtk_clk_register_composite(const struct mtk_composite *mc,
void __iomem *base, spinlock_t *lock) void __iomem *base, spinlock_t *lock)
...@@ -268,6 +273,7 @@ void mtk_clk_register_composites(const struct mtk_composite *mcs, ...@@ -268,6 +273,7 @@ void mtk_clk_register_composites(const struct mtk_composite *mcs,
clk_data->clks[mc->id] = clk; clk_data->clks[mc->id] = clk;
} }
} }
EXPORT_SYMBOL_GPL(mtk_clk_register_composites);
void mtk_clk_register_dividers(const struct mtk_clk_divider *mcds, void mtk_clk_register_dividers(const struct mtk_clk_divider *mcds,
int num, void __iomem *base, spinlock_t *lock, int num, void __iomem *base, spinlock_t *lock,
...@@ -326,3 +332,5 @@ int mtk_clk_simple_probe(struct platform_device *pdev) ...@@ -326,3 +332,5 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
mtk_free_clk_data(clk_data); mtk_free_clk_data(clk_data);
return r; return r;
} }
MODULE_LICENSE("GPL");
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/mfd/syscon.h> #include <linux/mfd/syscon.h>
#include <linux/module.h>
#include "clk-mtk.h" #include "clk-mtk.h"
#include "clk-mux.h" #include "clk-mux.h"
...@@ -195,3 +196,6 @@ int mtk_clk_register_muxes(const struct mtk_mux *muxes, ...@@ -195,3 +196,6 @@ int mtk_clk_register_muxes(const struct mtk_mux *muxes,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(mtk_clk_register_muxes);
MODULE_LICENSE("GPL");
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/module.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/clkdev.h> #include <linux/clkdev.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -385,3 +386,6 @@ void mtk_clk_register_plls(struct device_node *node, ...@@ -385,3 +386,6 @@ void mtk_clk_register_plls(struct device_node *node,
clk_data->clks[pll->id] = clk; clk_data->clks[pll->id] = clk;
} }
} }
EXPORT_SYMBOL_GPL(mtk_clk_register_plls);
MODULE_LICENSE("GPL");
...@@ -137,3 +137,5 @@ void mtk_register_reset_controller_set_clr(struct device_node *np, ...@@ -137,3 +137,5 @@ void mtk_register_reset_controller_set_clr(struct device_node *np,
mtk_register_reset_controller_common(np, num_regs, regofs, mtk_register_reset_controller_common(np, num_regs, regofs,
&mtk_reset_ops_set_clr); &mtk_reset_ops_set_clr);
} }
MODULE_LICENSE("GPL");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment