Lines Matching +full:regulator +full:- +full:settling +full:- +full:time +full:- +full:down +full:- +full:us

1 // SPDX-License-Identifier: GPL-2.0-only
10 * - We cli/sti on stepping A0 CPUs around the FID/VID transition.
13 * - We disable half multipliers if ACPI is used on A0 stepping CPUs.
38 #include "powernow-k7.h"
82 150, 225, 160, 165, 170, 180, -1, -1,
95 static unsigned int minimum_speed = -1;
107 delta = (fsbspeed > f) ? fsbspeed - f : f - fsbspeed; in check_fsb()
134 if ((c->x86_model == 6) && (c->x86_stepping == 0)) { in check_powernow()
180 return -ENOMEM; in get_ranges()
275 /* Going down, so change FID first */ in powernow_target()
303 retval = -EINVAL; in powernow_acpi_init()
309 retval = -ENOMEM; in powernow_acpi_init()
313 if (!zalloc_cpumask_var(&acpi_processor_perf->shared_cpu_map, in powernow_acpi_init()
315 retval = -ENOMEM; in powernow_acpi_init()
320 retval = -EIO; in powernow_acpi_init()
324 if (acpi_processor_perf->control_register.space_id != in powernow_acpi_init()
326 retval = -ENODEV; in powernow_acpi_init()
330 if (acpi_processor_perf->status_register.space_id != in powernow_acpi_init()
332 retval = -ENODEV; in powernow_acpi_init()
336 number_scales = acpi_processor_perf->state_count; in powernow_acpi_init()
339 retval = -ENODEV; in powernow_acpi_init()
346 retval = -ENOMEM; in powernow_acpi_init()
350 pc.val = (unsigned long) acpi_processor_perf->states[0].control; in powernow_acpi_init()
354 &acpi_processor_perf->states[i]; in powernow_acpi_init()
357 pc.val = (unsigned long) state->control; in powernow_acpi_init()
358 pr_debug("acpi: P%d: %d MHz %d mW %d uS control %08x SGTC %d\n", in powernow_acpi_init()
360 (u32) state->core_frequency, in powernow_acpi_init()
361 (u32) state->power, in powernow_acpi_init()
362 (u32) state->transition_latency, in powernow_acpi_init()
363 (u32) state->control, in powernow_acpi_init()
377 * get a KHz value (e.g. 1266000). However, powernow-k7 works in powernow_acpi_init()
398 if (state->core_frequency != speed_mhz) { in powernow_acpi_init()
399 state->core_frequency = speed_mhz; in powernow_acpi_init()
424 free_cpumask_var(acpi_processor_perf->shared_cpu_map); in powernow_acpi_init()
435 …pr_info("no support for ACPI processor found - please recompile your kernel with ACPI processor\n"… in powernow_acpi_init()
436 return -EINVAL; in powernow_acpi_init()
444 pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid); in print_pst_entry()
465 pr_debug("Table version: 0x%x\n", psb->tableversion); in powernow_decode_bios()
466 if (psb->tableversion != 0x12) { in powernow_decode_bios()
468 return -ENODEV; in powernow_decode_bios()
471 pr_debug("Flags: 0x%x\n", psb->flags); in powernow_decode_bios()
472 if ((psb->flags & 1) == 0) in powernow_decode_bios()
473 pr_debug("Mobile voltage regulator\n"); in powernow_decode_bios()
475 pr_debug("Desktop voltage regulator\n"); in powernow_decode_bios()
477 latency = psb->settlingtime; in powernow_decode_bios()
479 pr_info("BIOS set settling time to %d microseconds. Should be at least 100. Correcting.\n", in powernow_decode_bios()
483 pr_debug("Settling Time: %d microseconds.\n", in powernow_decode_bios()
484 psb->settlingtime); in powernow_decode_bios()
487 psb->numpst); in powernow_decode_bios()
493 for (j = 0; j < psb->numpst; j++) { in powernow_decode_bios()
495 number_scales = pst->numpstates; in powernow_decode_bios()
497 if ((etuple == pst->cpuid) && in powernow_decode_bios()
498 check_fsb(pst->fsbspeed) && in powernow_decode_bios()
499 (maxfid == pst->maxfid) && in powernow_decode_bios()
500 (startvid == pst->startvid)) { in powernow_decode_bios()
516 return -EINVAL; in powernow_decode_bios()
521 return -ENODEV; in powernow_decode_bios()
531 * the "well-known" other OS.
570 d->ident); in acer_cpufreq_pst()
598 if (policy->cpu != 0) in powernow_cpu_init()
599 return -ENODEV; in powernow_cpu_init()
608 return -EINVAL; in powernow_cpu_init()
613 pr_info("PSB/PST known to be broken - trying ACPI instead\n"); in powernow_cpu_init()
621 minimum_speed = -1; in powernow_cpu_init()
637 pr_info("Minimum speed %d MHz - Maximum speed %d MHz\n", in powernow_cpu_init()
640 policy->cpuinfo.transition_latency = in powernow_cpu_init()
642 policy->freq_table = powernow_table; in powernow_cpu_init()
652 free_cpumask_var(acpi_processor_perf->shared_cpu_map); in powernow_cpu_exit()
670 .name = "powernow-k7",
677 return -ENODEV; in powernow_init()