Lines Matching full:m0
42 * clk = clkin * n / m0 / m1
50 struct aw_clk_factor m0; member
105 uint32_t n, m0, m1; in aw_clk_nmm_find_best() local
113 max_m0 = aw_clk_factor_get_max(&sc->m0); in aw_clk_nmm_find_best()
114 min_m0 = aw_clk_factor_get_min(&sc->m0); in aw_clk_nmm_find_best()
118 for (m0 = min_m0; m0 <= max_m0; ) { in aw_clk_nmm_find_best()
121 cur = fparent * n / m0 / m1; in aw_clk_nmm_find_best()
125 *factor_m0 = m0; in aw_clk_nmm_find_best()
132 m0++; in aw_clk_nmm_find_best()
144 uint32_t val, n, m0, m1, best_n, best_m0, best_m1; in aw_clk_nmm_set_freq() local
175 m0 = aw_clk_factor_get_value(&sc->m0, best_m0); in aw_clk_nmm_set_freq()
178 val &= ~sc->m0.mask; in aw_clk_nmm_set_freq()
181 val |= m0 << sc->m0.shift; in aw_clk_nmm_set_freq()
206 uint32_t val, n, m0, m1; in aw_clk_nmm_recalc() local
215 m0 = aw_clk_get_factor(val, &sc->m0); in aw_clk_nmm_recalc()
218 *freq = *freq * n / m0 / m1; in aw_clk_nmm_recalc()
255 sc->m0.shift = clkdef->m0.shift; in aw_clk_nmm_register()
256 sc->m0.width = clkdef->m0.width; in aw_clk_nmm_register()
257 sc->m0.mask = ((1 << sc->m0.width) - 1) << sc->m0.shift; in aw_clk_nmm_register()
258 sc->m0.value = clkdef->m0.value; in aw_clk_nmm_register()
259 sc->m0.flags = clkdef->m0.flags; in aw_clk_nmm_register()