Lines Matching +full:270 +full:m
152 * Calculate m/n:d rate
154 * parent_rate m
159 calc_rate(unsigned long rate, u32 m, u32 n, u32 mode, u32 hid_div) in calc_rate() argument
168 tmp *= m; in calc_rate()
180 u32 hid_div, m = 0, n = 0, mode = 0, mask; in __clk_rcg2_recalc_rate() local
184 regmap_read(rcg->clkr.regmap, RCG_M_OFFSET(rcg), &m); in __clk_rcg2_recalc_rate()
185 m &= mask; in __clk_rcg2_recalc_rate()
189 n += m; in __clk_rcg2_recalc_rate()
198 return calc_rate(parent_rate, m, n, mode, hid_div); in __clk_rcg2_recalc_rate()
256 do_div(tmp, f->m); in _freq_tbl_determine_rate()
298 RCG_M_OFFSET(rcg), mask, f->m); in __clk_rcg2_configure()
303 RCG_N_OFFSET(rcg), mask, ~(f->n - f->m)); in __clk_rcg2_configure()
310 n_minus_m = f->n - f->m; in __clk_rcg2_configure()
313 d_val = clamp_t(u32, d_val, f->m, n_minus_m); in __clk_rcg2_configure()
326 if (rcg->mnd_width && f->n && (f->m != f->n)) in __clk_rcg2_configure()
405 u32 notn_m, n, m, d, not2d, mask; in clk_rcg2_get_duty_cycle() local
415 regmap_read(rcg->clkr.regmap, RCG_M_OFFSET(rcg), &m); in clk_rcg2_get_duty_cycle()
418 if (!not2d && !m && !notn_m) { in clk_rcg2_get_duty_cycle()
430 n = (~(notn_m) + m) & mask; in clk_rcg2_get_duty_cycle()
441 u32 notn_m, n, m, d, not2d, mask, duty_per, cfg; in clk_rcg2_set_duty_cycle() local
451 regmap_read(rcg->clkr.regmap, RCG_M_OFFSET(rcg), &m); in clk_rcg2_set_duty_cycle()
458 n = (~(notn_m) + m) & mask; in clk_rcg2_set_duty_cycle()
471 if ((d / 2) > (n - m)) in clk_rcg2_set_duty_cycle()
472 d = (n - m) * 2; in clk_rcg2_set_duty_cycle()
473 else if ((d / 2) < (m / 2)) in clk_rcg2_set_duty_cycle()
474 d = m; in clk_rcg2_set_duty_cycle()
524 static const struct frac_entry frac_table_675m[] = { /* link rate of 270M */
525 { 52, 295 }, /* 119 M */
526 { 11, 57 }, /* 130.25 M */
527 { 63, 307 }, /* 138.50 M */
528 { 11, 50 }, /* 148.50 M */
529 { 47, 206 }, /* 154 M */
530 { 31, 100 }, /* 205.25 M */
531 { 107, 269 }, /* 268.50 M */
535 static struct frac_entry frac_table_810m[] = { /* Link rate of 162M */
536 { 31, 211 }, /* 119 M */
537 { 32, 199 }, /* 130.25 M */
538 { 63, 307 }, /* 138.50 M */
539 { 11, 60 }, /* 148.50 M */
540 { 50, 263 }, /* 154 M */
541 { 31, 120 }, /* 205.25 M */
542 { 119, 359 }, /* 268.50 M */
576 f.m = frac->num; in clk_edp_pixel_set_rate()
840 f.m = frac->num; in clk_pixel_set_rate()
1038 * In case clock is disabled, update the M, N and D registers, cache in clk_rcg2_shared_set_rate()
1193 f->m = val; in clk_rcg2_dfs_populate_freq()
1199 val += f->m; in clk_rcg2_dfs_populate_freq()
1203 f->freq = calc_rate(prate, f->m, f->n, mode, f->pre_div); in clk_rcg2_dfs_populate_freq()
1245 u32 level, mask, cfg, m = 0, n = 0, mode, pre_div; in clk_rcg2_dfs_recalc_rate() local
1275 rcg->cmd_rcgr + SE_PERF_M_DFSR(level), &m); in clk_rcg2_dfs_recalc_rate()
1276 m &= mask; in clk_rcg2_dfs_recalc_rate()
1282 n += m; in clk_rcg2_dfs_recalc_rate()
1285 return calc_rate(parent_rate, m, n, mode, pre_div); in clk_rcg2_dfs_recalc_rate()
1371 f.m = num; in clk_rcg2_dp_set_rate()
1374 f.m = 0; in clk_rcg2_dp_set_rate()