Lines Matching refs:clock
121 static void mrst_lvds_clock(int refclk, struct gma_clock_t *clock) in mrst_lvds_clock() argument
123 clock->dot = (refclk * clock->m) / (14 * clock->p1); in mrst_lvds_clock()
126 static void mrst_print_pll(struct gma_clock_t *clock) in mrst_print_pll() argument
129 clock->dot, clock->m, clock->m1, clock->m2, clock->n, in mrst_print_pll()
130 clock->p1, clock->p2); in mrst_print_pll()
137 struct gma_clock_t clock; in mrst_sdvo_find_best_pll() local
143 for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) { in mrst_sdvo_find_best_pll()
144 for (clock.n = limit->n.min; clock.n <= limit->n.max; in mrst_sdvo_find_best_pll()
145 clock.n++) { in mrst_sdvo_find_best_pll()
146 for (clock.p1 = limit->p1.min; in mrst_sdvo_find_best_pll()
147 clock.p1 <= limit->p1.max; clock.p1++) { in mrst_sdvo_find_best_pll()
149 clock.p = clock.p1 * limit->p2.p2_slow; in mrst_sdvo_find_best_pll()
150 target_vco = target * clock.p; in mrst_sdvo_find_best_pll()
159 actual_freq = (refclk * clock.m) / in mrst_sdvo_find_best_pll()
160 (clock.n * clock.p); in mrst_sdvo_find_best_pll()
175 *best_clock = clock; in mrst_sdvo_find_best_pll()
194 struct gma_clock_t clock; in mrst_lvds_find_best_pll() local
199 for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) { in mrst_lvds_find_best_pll()
200 for (clock.p1 = limit->p1.min; clock.p1 <= limit->p1.max; in mrst_lvds_find_best_pll()
201 clock.p1++) { in mrst_lvds_find_best_pll()
204 mrst_lvds_clock(refclk, &clock); in mrst_lvds_find_best_pll()
206 this_err = abs(clock.dot - target); in mrst_lvds_find_best_pll()
208 *best_clock = clock; in mrst_lvds_find_best_pll()
376 struct gma_clock_t clock; in oaktrail_crtc_mode_set() local
511 ok = limit->find_pll(limit, crtc, adjusted_mode->clock, in oaktrail_crtc_mode_set()
512 refclk, &clock); in oaktrail_crtc_mode_set()
516 clock.p1 = (1L << (clock.p1 - 1)); in oaktrail_crtc_mode_set()
517 clock.m -= 2; in oaktrail_crtc_mode_set()
518 clock.n = (1L << (clock.n - 1)); in oaktrail_crtc_mode_set()
524 mrst_print_pll(&clock); in oaktrail_crtc_mode_set()
527 fp = clock.n << 16 | clock.m; in oaktrail_crtc_mode_set()
529 fp = oaktrail_m_converts[(clock.m - MRST_M_MIN)] << 8; in oaktrail_crtc_mode_set()
543 adjusted_mode->clock / mode->clock; in oaktrail_crtc_mode_set()
554 dpll |= clock.p1 << 16; // dpll |= (1 << (clock.p1 - 1)) << 16; in oaktrail_crtc_mode_set()
556 dpll |= (1 << (clock.p1 - 2)) << 17; in oaktrail_crtc_mode_set()
669 .clock = mrst_lvds_clock,