Lines Matching refs:sdm
13 struct ccu_sdm_internal *sdm) in ccu_sdm_helper_is_enabled() argument
18 if (sdm->enable && !(readl(common->base + common->reg) & sdm->enable)) in ccu_sdm_helper_is_enabled()
21 return !!(readl(common->base + sdm->tuning_reg) & sdm->tuning_enable); in ccu_sdm_helper_is_enabled()
25 struct ccu_sdm_internal *sdm, in ccu_sdm_helper_enable() argument
36 for (i = 0; i < sdm->table_size; i++) in ccu_sdm_helper_enable()
37 if (sdm->table[i].rate == rate) in ccu_sdm_helper_enable()
38 writel(sdm->table[i].pattern, in ccu_sdm_helper_enable()
39 common->base + sdm->tuning_reg); in ccu_sdm_helper_enable()
43 reg = readl(common->base + sdm->tuning_reg); in ccu_sdm_helper_enable()
44 writel(reg | sdm->tuning_enable, common->base + sdm->tuning_reg); in ccu_sdm_helper_enable()
49 writel(reg | sdm->enable, common->base + common->reg); in ccu_sdm_helper_enable()
54 struct ccu_sdm_internal *sdm) in ccu_sdm_helper_disable() argument
64 writel(reg & ~sdm->enable, common->base + common->reg); in ccu_sdm_helper_disable()
68 reg = readl(common->base + sdm->tuning_reg); in ccu_sdm_helper_disable()
69 writel(reg & ~sdm->tuning_enable, common->base + sdm->tuning_reg); in ccu_sdm_helper_disable()
91 struct ccu_sdm_internal *sdm, in ccu_sdm_helper_has_rate() argument
99 for (i = 0; i < sdm->table_size; i++) in ccu_sdm_helper_has_rate()
100 if (sdm->table[i].rate == rate) in ccu_sdm_helper_has_rate()
107 struct ccu_sdm_internal *sdm, in ccu_sdm_helper_read_rate() argument
122 reg = readl(common->base + sdm->tuning_reg); in ccu_sdm_helper_read_rate()
127 for (i = 0; i < sdm->table_size; i++) in ccu_sdm_helper_read_rate()
128 if (sdm->table[i].pattern == reg && in ccu_sdm_helper_read_rate()
129 sdm->table[i].m == m && sdm->table[i].n == n) in ccu_sdm_helper_read_rate()
130 return sdm->table[i].rate; in ccu_sdm_helper_read_rate()
137 struct ccu_sdm_internal *sdm, in ccu_sdm_helper_get_factors() argument
146 for (i = 0; i < sdm->table_size; i++) in ccu_sdm_helper_get_factors()
147 if (sdm->table[i].rate == rate) { in ccu_sdm_helper_get_factors()
148 *m = sdm->table[i].m; in ccu_sdm_helper_get_factors()
149 *n = sdm->table[i].n; in ccu_sdm_helper_get_factors()