Skip to content

Commit cccc3f1

Browse files
elkablogregkh
authored andcommitted
clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clock
[ Upstream commit 4e435a9 ] Remove the .set_parent method in clk_pm_cpu_ops. This method was supposed to be needed by the armada-37xx-cpufreq driver, but was never actually called due to wrong assumptions in the cpufreq driver. After this was fixed in the cpufreq driver, this method is not needed anymore. Signed-off-by: Marek Behún <kabel@kernel.org> Acked-by: Stephen Boyd <sboyd@kernel.org> Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com> Tested-by: Pali Rohár <pali@kernel.org> Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com> Tested-by: Anders Trier Olesen <anders.trier.olesen@gmail.com> Tested-by: Philip Soares <philips@netisense.com> Fixes: 2089dc3 ("clk: mvebu: armada-37xx-periph: add DVFS support for cpu clocks") Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a13b110 commit cccc3f1

1 file changed

Lines changed: 0 additions & 28 deletions

File tree

‎drivers/clk/mvebu/armada-37xx-periph.c‎

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -440,33 +440,6 @@ static u8 clk_pm_cpu_get_parent(struct clk_hw *hw)
440440
return val;
441441
}
442442

443-
static int clk_pm_cpu_set_parent(struct clk_hw *hw, u8 index)
444-
{
445-
struct clk_pm_cpu *pm_cpu = to_clk_pm_cpu(hw);
446-
struct regmap *base = pm_cpu->nb_pm_base;
447-
int load_level;
448-
449-
/*
450-
* We set the clock parent only if the DVFS is available but
451-
* not enabled.
452-
*/
453-
if (IS_ERR(base) || armada_3700_pm_dvfs_is_enabled(base))
454-
return -EINVAL;
455-
456-
/* Set the parent clock for all the load level */
457-
for (load_level = 0; load_level < LOAD_LEVEL_NR; load_level++) {
458-
unsigned int reg, mask, val,
459-
offset = ARMADA_37XX_NB_TBG_SEL_OFF;
460-
461-
armada_3700_pm_dvfs_update_regs(load_level, &reg, &offset);
462-
463-
val = index << offset;
464-
mask = ARMADA_37XX_NB_TBG_SEL_MASK << offset;
465-
regmap_update_bits(base, reg, mask, val);
466-
}
467-
return 0;
468-
}
469-
470443
static unsigned long clk_pm_cpu_recalc_rate(struct clk_hw *hw,
471444
unsigned long parent_rate)
472445
{
@@ -592,7 +565,6 @@ static int clk_pm_cpu_set_rate(struct clk_hw *hw, unsigned long rate,
592565

593566
static const struct clk_ops clk_pm_cpu_ops = {
594567
.get_parent = clk_pm_cpu_get_parent,
595-
.set_parent = clk_pm_cpu_set_parent,
596568
.round_rate = clk_pm_cpu_round_rate,
597569
.set_rate = clk_pm_cpu_set_rate,
598570
.recalc_rate = clk_pm_cpu_recalc_rate,

0 commit comments

Comments
 (0)