Skip to content

Commit dc4805c

Browse files
author
Shawn Guo
committed
ARM: imx: remove ENABLE and BYPASS bits from clk-pllv3 driver
Since ENABLE and BYPASS bits of PLLs are now implemented as separate gate and mux clocks by clock drivers, the code handling these two bits can be removed from clk-pllv3 driver. Signed-off-by: Shawn Guo <[email protected]>
1 parent db7c065 commit dc4805c

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

arch/arm/mach-imx/clk-pllv3.c

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#define PLL_DENOM_OFFSET 0x20
2424

2525
#define BM_PLL_POWER (0x1 << 12)
26-
#define BM_PLL_ENABLE (0x1 << 13)
27-
#define BM_PLL_BYPASS (0x1 << 16)
2826
#define BM_PLL_LOCK (0x1 << 31)
2927

3028
/**
@@ -84,10 +82,6 @@ static int clk_pllv3_prepare(struct clk_hw *hw)
8482
if (ret)
8583
return ret;
8684

87-
val = readl_relaxed(pll->base);
88-
val &= ~BM_PLL_BYPASS;
89-
writel_relaxed(val, pll->base);
90-
9185
return 0;
9286
}
9387

@@ -97,36 +91,13 @@ static void clk_pllv3_unprepare(struct clk_hw *hw)
9791
u32 val;
9892

9993
val = readl_relaxed(pll->base);
100-
val |= BM_PLL_BYPASS;
10194
if (pll->powerup_set)
10295
val &= ~BM_PLL_POWER;
10396
else
10497
val |= BM_PLL_POWER;
10598
writel_relaxed(val, pll->base);
10699
}
107100

108-
static int clk_pllv3_enable(struct clk_hw *hw)
109-
{
110-
struct clk_pllv3 *pll = to_clk_pllv3(hw);
111-
u32 val;
112-
113-
val = readl_relaxed(pll->base);
114-
val |= BM_PLL_ENABLE;
115-
writel_relaxed(val, pll->base);
116-
117-
return 0;
118-
}
119-
120-
static void clk_pllv3_disable(struct clk_hw *hw)
121-
{
122-
struct clk_pllv3 *pll = to_clk_pllv3(hw);
123-
u32 val;
124-
125-
val = readl_relaxed(pll->base);
126-
val &= ~BM_PLL_ENABLE;
127-
writel_relaxed(val, pll->base);
128-
}
129-
130101
static unsigned long clk_pllv3_recalc_rate(struct clk_hw *hw,
131102
unsigned long parent_rate)
132103
{
@@ -169,8 +140,6 @@ static int clk_pllv3_set_rate(struct clk_hw *hw, unsigned long rate,
169140
static const struct clk_ops clk_pllv3_ops = {
170141
.prepare = clk_pllv3_prepare,
171142
.unprepare = clk_pllv3_unprepare,
172-
.enable = clk_pllv3_enable,
173-
.disable = clk_pllv3_disable,
174143
.recalc_rate = clk_pllv3_recalc_rate,
175144
.round_rate = clk_pllv3_round_rate,
176145
.set_rate = clk_pllv3_set_rate,
@@ -225,8 +194,6 @@ static int clk_pllv3_sys_set_rate(struct clk_hw *hw, unsigned long rate,
225194
static const struct clk_ops clk_pllv3_sys_ops = {
226195
.prepare = clk_pllv3_prepare,
227196
.unprepare = clk_pllv3_unprepare,
228-
.enable = clk_pllv3_enable,
229-
.disable = clk_pllv3_disable,
230197
.recalc_rate = clk_pllv3_sys_recalc_rate,
231198
.round_rate = clk_pllv3_sys_round_rate,
232199
.set_rate = clk_pllv3_sys_set_rate,
@@ -299,8 +266,6 @@ static int clk_pllv3_av_set_rate(struct clk_hw *hw, unsigned long rate,
299266
static const struct clk_ops clk_pllv3_av_ops = {
300267
.prepare = clk_pllv3_prepare,
301268
.unprepare = clk_pllv3_unprepare,
302-
.enable = clk_pllv3_enable,
303-
.disable = clk_pllv3_disable,
304269
.recalc_rate = clk_pllv3_av_recalc_rate,
305270
.round_rate = clk_pllv3_av_round_rate,
306271
.set_rate = clk_pllv3_av_set_rate,
@@ -315,8 +280,6 @@ static unsigned long clk_pllv3_enet_recalc_rate(struct clk_hw *hw,
315280
static const struct clk_ops clk_pllv3_enet_ops = {
316281
.prepare = clk_pllv3_prepare,
317282
.unprepare = clk_pllv3_unprepare,
318-
.enable = clk_pllv3_enable,
319-
.disable = clk_pllv3_disable,
320283
.recalc_rate = clk_pllv3_enet_recalc_rate,
321284
};
322285

0 commit comments

Comments
 (0)