Skip to content

Commit 551b62b

Browse files
smaeulmripard
authored andcommitted
clk: sunxi-ng: Export symbols used by CCU drivers
For the individual CCU drivers to be built as modules, the ops structs, helper functions, and callback registration functions must be exported. These symbols are intended for use only by the adjacent CCU drivers, so export them into the SUNXI_CCU namespace. of_sunxi_ccu_probe is not exported because it is only used by built-in OF clock providers. Signed-off-by: Samuel Holland <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent fa55b7d commit 551b62b

File tree

14 files changed

+35
-0
lines changed

14 files changed

+35
-0
lines changed

drivers/clk/sunxi-ng/ccu_common.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ void ccu_helper_wait_for_lock(struct ccu_common *common, u32 lock)
3636

3737
WARN_ON(readl_relaxed_poll_timeout(addr, reg, reg & lock, 100, 70000));
3838
}
39+
EXPORT_SYMBOL_NS_GPL(ccu_helper_wait_for_lock, SUNXI_CCU);
3940

4041
/*
4142
* This clock notifier is called when the frequency of a PLL clock is
@@ -83,6 +84,7 @@ int ccu_pll_notifier_register(struct ccu_pll_nb *pll_nb)
8384
return clk_notifier_register(pll_nb->common->hw.clk,
8485
&pll_nb->clk_nb);
8586
}
87+
EXPORT_SYMBOL_NS_GPL(ccu_pll_notifier_register, SUNXI_CCU);
8688

8789
static int sunxi_ccu_probe(struct sunxi_ccu *ccu, struct device *dev,
8890
struct device_node *node, void __iomem *reg,
@@ -194,6 +196,7 @@ int devm_sunxi_ccu_probe(struct device *dev, void __iomem *reg,
194196

195197
return 0;
196198
}
199+
EXPORT_SYMBOL_NS_GPL(devm_sunxi_ccu_probe, SUNXI_CCU);
197200

198201
void of_sunxi_ccu_probe(struct device_node *node, void __iomem *reg,
199202
const struct sunxi_ccu_desc *desc)

drivers/clk/sunxi-ng/ccu_div.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,4 @@ const struct clk_ops ccu_div_ops = {
141141
.recalc_rate = ccu_div_recalc_rate,
142142
.set_rate = ccu_div_set_rate,
143143
};
144+
EXPORT_SYMBOL_NS_GPL(ccu_div_ops, SUNXI_CCU);

drivers/clk/sunxi-ng/ccu_frac.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ bool ccu_frac_helper_is_enabled(struct ccu_common *common,
1818

1919
return !(readl(common->base + common->reg) & cf->enable);
2020
}
21+
EXPORT_SYMBOL_NS_GPL(ccu_frac_helper_is_enabled, SUNXI_CCU);
2122

2223
void ccu_frac_helper_enable(struct ccu_common *common,
2324
struct ccu_frac_internal *cf)
@@ -33,6 +34,7 @@ void ccu_frac_helper_enable(struct ccu_common *common,
3334
writel(reg & ~cf->enable, common->base + common->reg);
3435
spin_unlock_irqrestore(common->lock, flags);
3536
}
37+
EXPORT_SYMBOL_NS_GPL(ccu_frac_helper_enable, SUNXI_CCU);
3638

3739
void ccu_frac_helper_disable(struct ccu_common *common,
3840
struct ccu_frac_internal *cf)
@@ -48,6 +50,7 @@ void ccu_frac_helper_disable(struct ccu_common *common,
4850
writel(reg | cf->enable, common->base + common->reg);
4951
spin_unlock_irqrestore(common->lock, flags);
5052
}
53+
EXPORT_SYMBOL_NS_GPL(ccu_frac_helper_disable, SUNXI_CCU);
5154

5255
bool ccu_frac_helper_has_rate(struct ccu_common *common,
5356
struct ccu_frac_internal *cf,
@@ -58,6 +61,7 @@ bool ccu_frac_helper_has_rate(struct ccu_common *common,
5861

5962
return (cf->rates[0] == rate) || (cf->rates[1] == rate);
6063
}
64+
EXPORT_SYMBOL_NS_GPL(ccu_frac_helper_has_rate, SUNXI_CCU);
6165

6266
unsigned long ccu_frac_helper_read_rate(struct ccu_common *common,
6367
struct ccu_frac_internal *cf)
@@ -79,6 +83,7 @@ unsigned long ccu_frac_helper_read_rate(struct ccu_common *common,
7983

8084
return (reg & cf->select) ? cf->rates[1] : cf->rates[0];
8185
}
86+
EXPORT_SYMBOL_NS_GPL(ccu_frac_helper_read_rate, SUNXI_CCU);
8287

8388
int ccu_frac_helper_set_rate(struct ccu_common *common,
8489
struct ccu_frac_internal *cf,
@@ -107,3 +112,4 @@ int ccu_frac_helper_set_rate(struct ccu_common *common,
107112

108113
return 0;
109114
}
115+
EXPORT_SYMBOL_NS_GPL(ccu_frac_helper_set_rate, SUNXI_CCU);

drivers/clk/sunxi-ng/ccu_gate.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ void ccu_gate_helper_disable(struct ccu_common *common, u32 gate)
2424

2525
spin_unlock_irqrestore(common->lock, flags);
2626
}
27+
EXPORT_SYMBOL_NS_GPL(ccu_gate_helper_disable, SUNXI_CCU);
2728

2829
static void ccu_gate_disable(struct clk_hw *hw)
2930
{
@@ -49,6 +50,7 @@ int ccu_gate_helper_enable(struct ccu_common *common, u32 gate)
4950

5051
return 0;
5152
}
53+
EXPORT_SYMBOL_NS_GPL(ccu_gate_helper_enable, SUNXI_CCU);
5254

5355
static int ccu_gate_enable(struct clk_hw *hw)
5456
{
@@ -64,6 +66,7 @@ int ccu_gate_helper_is_enabled(struct ccu_common *common, u32 gate)
6466

6567
return readl(common->base + common->reg) & gate;
6668
}
69+
EXPORT_SYMBOL_NS_GPL(ccu_gate_helper_is_enabled, SUNXI_CCU);
6770

6871
static int ccu_gate_is_enabled(struct clk_hw *hw)
6972
{
@@ -124,3 +127,4 @@ const struct clk_ops ccu_gate_ops = {
124127
.set_rate = ccu_gate_set_rate,
125128
.recalc_rate = ccu_gate_recalc_rate,
126129
};
130+
EXPORT_SYMBOL_NS_GPL(ccu_gate_ops, SUNXI_CCU);

drivers/clk/sunxi-ng/ccu_mp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ const struct clk_ops ccu_mp_ops = {
245245
.recalc_rate = ccu_mp_recalc_rate,
246246
.set_rate = ccu_mp_set_rate,
247247
};
248+
EXPORT_SYMBOL_NS_GPL(ccu_mp_ops, SUNXI_CCU);
248249

249250
/*
250251
* Support for MMC timing mode switching
@@ -325,3 +326,4 @@ const struct clk_ops ccu_mp_mmc_ops = {
325326
.recalc_rate = ccu_mp_mmc_recalc_rate,
326327
.set_rate = ccu_mp_mmc_set_rate,
327328
};
329+
EXPORT_SYMBOL_NS_GPL(ccu_mp_mmc_ops, SUNXI_CCU);

drivers/clk/sunxi-ng/ccu_mult.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,4 @@ const struct clk_ops ccu_mult_ops = {
170170
.recalc_rate = ccu_mult_recalc_rate,
171171
.set_rate = ccu_mult_set_rate,
172172
};
173+
EXPORT_SYMBOL_NS_GPL(ccu_mult_ops, SUNXI_CCU);

drivers/clk/sunxi-ng/ccu_mux.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ unsigned long ccu_mux_helper_apply_prediv(struct ccu_common *common,
6464
{
6565
return parent_rate / ccu_mux_get_prediv(common, cm, parent_index);
6666
}
67+
EXPORT_SYMBOL_NS_GPL(ccu_mux_helper_apply_prediv, SUNXI_CCU);
6768

6869
static unsigned long ccu_mux_helper_unapply_prediv(struct ccu_common *common,
6970
struct ccu_mux_internal *cm,
@@ -152,6 +153,7 @@ int ccu_mux_helper_determine_rate(struct ccu_common *common,
152153
req->rate = best_rate;
153154
return 0;
154155
}
156+
EXPORT_SYMBOL_NS_GPL(ccu_mux_helper_determine_rate, SUNXI_CCU);
155157

156158
u8 ccu_mux_helper_get_parent(struct ccu_common *common,
157159
struct ccu_mux_internal *cm)
@@ -174,6 +176,7 @@ u8 ccu_mux_helper_get_parent(struct ccu_common *common,
174176

175177
return parent;
176178
}
179+
EXPORT_SYMBOL_NS_GPL(ccu_mux_helper_get_parent, SUNXI_CCU);
177180

178181
int ccu_mux_helper_set_parent(struct ccu_common *common,
179182
struct ccu_mux_internal *cm,
@@ -195,6 +198,7 @@ int ccu_mux_helper_set_parent(struct ccu_common *common,
195198

196199
return 0;
197200
}
201+
EXPORT_SYMBOL_NS_GPL(ccu_mux_helper_set_parent, SUNXI_CCU);
198202

199203
static void ccu_mux_disable(struct clk_hw *hw)
200204
{
@@ -251,6 +255,7 @@ const struct clk_ops ccu_mux_ops = {
251255
.determine_rate = __clk_mux_determine_rate,
252256
.recalc_rate = ccu_mux_recalc_rate,
253257
};
258+
EXPORT_SYMBOL_NS_GPL(ccu_mux_ops, SUNXI_CCU);
254259

255260
/*
256261
* This clock notifier is called when the frequency of the of the parent
@@ -285,3 +290,4 @@ int ccu_mux_notifier_register(struct clk *clk, struct ccu_mux_nb *mux_nb)
285290

286291
return clk_notifier_register(clk, &mux_nb->clk_nb);
287292
}
293+
EXPORT_SYMBOL_NS_GPL(ccu_mux_notifier_register, SUNXI_CCU);

drivers/clk/sunxi-ng/ccu_nk.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,4 @@ const struct clk_ops ccu_nk_ops = {
157157
.round_rate = ccu_nk_round_rate,
158158
.set_rate = ccu_nk_set_rate,
159159
};
160+
EXPORT_SYMBOL_NS_GPL(ccu_nk_ops, SUNXI_CCU);

drivers/clk/sunxi-ng/ccu_nkm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,4 @@ const struct clk_ops ccu_nkm_ops = {
206206
.recalc_rate = ccu_nkm_recalc_rate,
207207
.set_rate = ccu_nkm_set_rate,
208208
};
209+
EXPORT_SYMBOL_NS_GPL(ccu_nkm_ops, SUNXI_CCU);

drivers/clk/sunxi-ng/ccu_nkmp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,4 @@ const struct clk_ops ccu_nkmp_ops = {
230230
.round_rate = ccu_nkmp_round_rate,
231231
.set_rate = ccu_nkmp_set_rate,
232232
};
233+
EXPORT_SYMBOL_NS_GPL(ccu_nkmp_ops, SUNXI_CCU);

0 commit comments

Comments
 (0)