Lines Matching +full:bottom +full:- +full:speed
1 // SPDX-License-Identifier: GPL-2.0-only
3 * (C) 2001-2004 Dave Jones.
13 * Present in Samuel 2 (steppings 1-7 only) (C5B), and Ezra (C5C).
16 * It is present in Ezra-T (C5M), Nehemiah (C5X) and above.
90 static char *print_speed(int speed) in print_speed() argument
92 if (speed < 1000) { in print_speed()
93 snprintf(speedbuffer, sizeof(speedbuffer), "%dMHz", speed); in print_speed()
97 if (speed%1000 == 0) in print_speed()
99 "%dGHz", speed/1000); in print_speed()
102 "%d.%dGHz", speed/1000, (speed%1000)/100); in print_speed()
192 /* Dummy op - must do something useless after P_LVL3 in do_powersaver()
210 /* Dummy op - must do something useless after P_LVL3 read */ in do_powersaver()
229 /* Dummy op - must do something useless after P_LVL3 in do_powersaver()
250 int speed, mult; in longhaul_setstate() local
261 if (mult == -1) in longhaul_setstate()
262 return -EINVAL; in longhaul_setstate()
264 speed = calc_speed(mult); in longhaul_setstate()
265 if ((speed > highest_speed) || (speed < lowest_speed)) in longhaul_setstate()
266 return -EINVAL; in longhaul_setstate()
273 freqs.new = speed; in longhaul_setstate()
276 fsb, mult/10, mult%10, print_speed(speed/1000)); in longhaul_setstate()
288 || ((pr != NULL) && pr->flags.bm_control))) { in longhaul_setstate()
293 bm_timeout--; in longhaul_setstate()
302 } else if ((pr != NULL) && pr->flags.bm_control) { in longhaul_setstate()
317 * Longhaul v2 appears in Samuel2 Steppings 1->7 [C5B] and Ezra [C5C] in longhaul_setstate()
319 * Longhaul v3 (aka Powersaver). (Ezra-T [C5M] & Nehemiah [C5N]) in longhaul_setstate()
328 do_powersaver(cx->address, mults_index, dir); in longhaul_setstate()
338 } else if ((pr != NULL) && pr->flags.bm_control) { in longhaul_setstate()
350 if (unlikely(freqs.new != speed)) { in longhaul_setstate()
353 * equal to 0. Jumpers at the bottom of processor will change in longhaul_setstate()
390 return -EBUSY; in longhaul_setstate()
409 int speed = cpu_khz / 1000; in guess_fsb() local
417 f_min = f_max - ROUNDING; in guess_fsb()
418 if ((speed <= f_max) && (speed >= f_min)) in guess_fsb()
433 if (mult == -1) { in longhaul_get_ranges()
435 return -EINVAL; in longhaul_get_ranges()
440 return -EINVAL; in longhaul_get_ranges()
442 /* Get max multiplier - as we always did. in longhaul_get_ranges()
464 pr_debug("FSB:%dMHz Lowest speed: %s Highest speed:%s\n", fsb, in longhaul_get_ranges()
470 return -EINVAL; in longhaul_get_ranges()
475 return -EINVAL; in longhaul_get_ranges()
481 return -ENOMEM; in longhaul_get_ranges()
485 if (ratio == -1) in longhaul_get_ranges()
495 return -ENODEV; in longhaul_get_ranges()
498 for (j = 0; j < k - 1; j++) { in longhaul_get_ranges()
534 unsigned int j, speed, pos, kHz_step, numvscales; in longhaul_setup_voltagescaling() local
559 pr_info("Bogus values Min:%d.%03d Max:%d.%03d - Voltage scaling disabled\n", in longhaul_setup_voltagescaling()
566 …pr_info("Claims to support voltage scaling but min & max are both %d.%03d - Voltage scaling disabl… in longhaul_setup_voltagescaling()
572 numvscales = maxvid.pos - minvid.pos + 1; in longhaul_setup_voltagescaling()
583 if (min_vid_speed == -1) in longhaul_setup_voltagescaling()
601 kHz_step = (highest_speed - min_vid_speed) / numvscales; in longhaul_setup_voltagescaling()
604 speed = freq_pos->frequency; in longhaul_setup_voltagescaling()
605 if (speed > min_vid_speed) in longhaul_setup_voltagescaling()
606 pos = (speed - min_vid_speed) / kHz_step + minvid.pos; in longhaul_setup_voltagescaling()
609 freq_pos->driver_data |= mV_vrm_table[pos] << 8; in longhaul_setup_voltagescaling()
612 speed, j, vid.mV); in longhaul_setup_voltagescaling()
651 i--; in longhaul_target()
702 /* Find CN400 V-Link host bridge */ in enable_arbiter_disable()
768 switch (c->x86_model) { in longhaul_cpu_init()
778 switch (c->x86_stepping) { in longhaul_cpu_init()
790 if (c->x86_stepping < 8) { in longhaul_cpu_init()
805 cpuname = "C3 'Ezra-T' [C5M]"; in longhaul_cpu_init()
817 switch (c->x86_stepping) { in longhaul_cpu_init()
866 cx = &pr->power.states[ACPI_STATE_C3]; in longhaul_cpu_init()
867 if (cx->address > 0 && cx->latency <= 1000) in longhaul_cpu_init()
880 && ((pr == NULL) || !(pr->flags.bm_control))) { in longhaul_cpu_init()
882 return -ENODEV; in longhaul_cpu_init()
897 policy->transition_delay_us = 200000; /* usec */ in longhaul_cpu_init()
898 policy->freq_table = longhaul_table; in longhaul_cpu_init()
923 return -ENODEV; in longhaul_init()
926 pr_err("Option \"enable\" not set - Aborting\n"); in longhaul_init()
927 return -ENODEV; in longhaul_init()
932 return -ENODEV; in longhaul_init()
938 return -ENODEV; in longhaul_init()
941 switch (c->x86_model) { in longhaul_init()
945 pr_err("Use acpi-cpufreq driver for VIA C7\n"); in longhaul_init()
948 return -ENODEV; in longhaul_init()
961 freqs.old = policy->cur; in longhaul_exit()