Lines Matching defs:common

12 bool ccu_sdm_helper_is_enabled(struct ccu_common *common,
15 if (!(common->features & CCU_FEATURE_SIGMA_DELTA_MOD))
18 if (sdm->enable && !(readl(common->base + common->reg) & sdm->enable))
21 return !!(readl(common->base + sdm->tuning_reg) & sdm->tuning_enable);
25 void ccu_sdm_helper_enable(struct ccu_common *common,
33 if (!(common->features & CCU_FEATURE_SIGMA_DELTA_MOD))
40 common->base + sdm->tuning_reg);
43 spin_lock_irqsave(common->lock, flags);
44 reg = readl(common->base + sdm->tuning_reg);
45 writel(reg | sdm->tuning_enable, common->base + sdm->tuning_reg);
46 spin_unlock_irqrestore(common->lock, flags);
48 spin_lock_irqsave(common->lock, flags);
49 reg = readl(common->base + common->reg);
50 writel(reg | sdm->enable, common->base + common->reg);
51 spin_unlock_irqrestore(common->lock, flags);
55 void ccu_sdm_helper_disable(struct ccu_common *common,
61 if (!(common->features & CCU_FEATURE_SIGMA_DELTA_MOD))
64 spin_lock_irqsave(common->lock, flags);
65 reg = readl(common->base + common->reg);
66 writel(reg & ~sdm->enable, common->base + common->reg);
67 spin_unlock_irqrestore(common->lock, flags);
69 spin_lock_irqsave(common->lock, flags);
70 reg = readl(common->base + sdm->tuning_reg);
71 writel(reg & ~sdm->tuning_enable, common->base + sdm->tuning_reg);
72 spin_unlock_irqrestore(common->lock, flags);
93 bool ccu_sdm_helper_has_rate(struct ccu_common *common,
99 if (!(common->features & CCU_FEATURE_SIGMA_DELTA_MOD))
110 unsigned long ccu_sdm_helper_read_rate(struct ccu_common *common,
118 clk_hw_get_name(&common->hw));
120 if (!(common->features & CCU_FEATURE_SIGMA_DELTA_MOD))
124 clk_hw_get_name(&common->hw));
126 reg = readl(common->base + sdm->tuning_reg);
129 clk_hw_get_name(&common->hw), reg);
141 int ccu_sdm_helper_get_factors(struct ccu_common *common,
148 if (!(common->features & CCU_FEATURE_SIGMA_DELTA_MOD))