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);
24 void ccu_sdm_helper_enable(struct ccu_common *common,
32 if (!(common->features & CCU_FEATURE_SIGMA_DELTA_MOD))
39 common->base + sdm->tuning_reg);
42 spin_lock_irqsave(common->lock, flags);
43 reg = readl(common->base + sdm->tuning_reg);
44 writel(reg | sdm->tuning_enable, common->base + sdm->tuning_reg);
45 spin_unlock_irqrestore(common->lock, flags);
47 spin_lock_irqsave(common->lock, flags);
48 reg = readl(common->base + common->reg);
49 writel(reg | sdm->enable, common->base + common->reg);
50 spin_unlock_irqrestore(common->lock, flags);
53 void ccu_sdm_helper_disable(struct ccu_common *common,
59 if (!(common->features & CCU_FEATURE_SIGMA_DELTA_MOD))
62 spin_lock_irqsave(common->lock, flags);
63 reg = readl(common->base + common->reg);
64 writel(reg & ~sdm->enable, common->base + common->reg);
65 spin_unlock_irqrestore(common->lock, flags);
67 spin_lock_irqsave(common->lock, flags);
68 reg = readl(common->base + sdm->tuning_reg);
69 writel(reg & ~sdm->tuning_enable, common->base + sdm->tuning_reg);
70 spin_unlock_irqrestore(common->lock, flags);
90 bool ccu_sdm_helper_has_rate(struct ccu_common *common,
96 if (!(common->features & CCU_FEATURE_SIGMA_DELTA_MOD))
106 unsigned long ccu_sdm_helper_read_rate(struct ccu_common *common,
114 clk_hw_get_name(&common->hw));
116 if (!(common->features & CCU_FEATURE_SIGMA_DELTA_MOD))
120 clk_hw_get_name(&common->hw));
122 reg = readl(common->base + sdm->tuning_reg);
125 clk_hw_get_name(&common->hw), reg);
136 int ccu_sdm_helper_get_factors(struct ccu_common *common,
143 if (!(common->features & CCU_FEATURE_SIGMA_DELTA_MOD))