Skip to content

Commit 9113207

Browse files
adureghello-tsstorulf
authored andcommitted
m68k: coldfire/clk.c: move m5441x specific code
Moving specific m5441x clk-related code in more appropriate location, since breaking compilation for other targets. Signed-off-by: Angelo Dureghello <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 47e9e10 commit 9113207

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

arch/m68k/coldfire/clk.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,6 @@ struct clk_ops clk_ops1 = {
7373
#endif /* MCFPM_PPMCR1 */
7474
#endif /* MCFPM_PPMCR0 */
7575

76-
static void __clk_enable2(struct clk *clk)
77-
{
78-
__raw_writel(__raw_readl(MCFSDHC_CLK) | (1 << clk->slot), MCFSDHC_CLK);
79-
}
80-
81-
static void __clk_disable2(struct clk *clk)
82-
{
83-
__raw_writel(__raw_readl(MCFSDHC_CLK) & ~(1 << clk->slot), MCFSDHC_CLK);
84-
}
85-
86-
struct clk_ops clk_ops2 = {
87-
.enable = __clk_enable2,
88-
.disable = __clk_disable2,
89-
};
90-
9176
struct clk *clk_get(struct device *dev, const char *id)
9277
{
9378
const char *clk_name = dev ? dev_name(dev) : id ? id : NULL;

arch/m68k/coldfire/m5441x.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,21 @@ static struct clk * const disable_clks[] __initconst = {
204204
&__clk_1_29, /* uart 9 */
205205
};
206206

207+
static void __clk_enable2(struct clk *clk)
208+
{
209+
__raw_writel(__raw_readl(MCFSDHC_CLK) | (1 << clk->slot), MCFSDHC_CLK);
210+
}
211+
212+
static void __clk_disable2(struct clk *clk)
213+
{
214+
__raw_writel(__raw_readl(MCFSDHC_CLK) & ~(1 << clk->slot), MCFSDHC_CLK);
215+
}
216+
217+
struct clk_ops clk_ops2 = {
218+
.enable = __clk_enable2,
219+
.disable = __clk_disable2,
220+
};
221+
207222
static void __init m5441x_clk_init(void)
208223
{
209224
unsigned i;

0 commit comments

Comments
 (0)