Lines Matching +full:low +full:- +full:speed
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org>
42 * init/main.c to make it non-init before enabling DEBUG_FREQ
51 * Currently, PowerMac cpufreq supports only high & low frequencies
109 /* Switch CPU speed under 750FX CPU control
132 /* tweak L2 for low voltage */ in cpu_750fx_cpu_speed()
155 /* Switch CPU speed using DFS */
189 /* Switch CPU speed using slewing GPIOs
231 /* Switch CPU speed under PMU control
255 * the above didn't re-enable the DEC */ in pmu_set_cpu_speed()
271 save_l3cr = _get_L3CR(); /* (returns -1 if not available) */ in pmu_set_cpu_speed()
272 save_l2cr = _get_L2CR(); /* (returns -1 if not available) */ in pmu_set_cpu_speed()
274 /* Send the new speed command. My assumption is that this command in pmu_set_cpu_speed()
281 /* Prepare the northbridge for the speed transition */ in pmu_set_cpu_speed()
284 /* Call low level code to backup CPU state and recover from in pmu_set_cpu_speed()
300 switch_mmu_context(NULL, current->active_mm, NULL); in pmu_set_cpu_speed()
306 /* Restore low level PMU operations */ in pmu_set_cpu_speed()
311 * as soon as interrupts are re-enabled and the generic in pmu_set_cpu_speed()
390 * GPIO space, and the device-tree doesn't help. in read_gpio()
400 * always force a speed change to high speed before sleep, to make sure in pmac_cpufreq_suspend()
401 * we have appropriate voltage and/or bus speed for the wakeup process, in pmac_cpufreq_suspend()
403 * not cause too short delays if we sleep in low speed and wake in high in pmac_cpufreq_suspend()
404 * speed.. in pmac_cpufreq_suspend()
421 /* We don't, hrm... we don't really know our speed here, best in pmac_cpufreq_resume()
423 * probably high speed due to our suspend() routine in pmac_cpufreq_resume()
449 "voltage-gpio"); in pmac_cpufreq_init_MacRISC3()
451 "frequency-gpio"); in pmac_cpufreq_init_MacRISC3()
453 "slewing-done"); in pmac_cpufreq_init_MacRISC3()
482 freqs = of_get_property(cpunode, "bus-frequencies", &lenp); in pmac_cpufreq_init_MacRISC3()
485 pr_err("bus-frequencies incorrect or missing\n"); in pmac_cpufreq_init_MacRISC3()
488 ratio = of_get_property(cpunode, "processor-to-bus-ratio*2", in pmac_cpufreq_init_MacRISC3()
491 pr_err("processor-to-bus-ratio*2 missing\n"); in pmac_cpufreq_init_MacRISC3()
499 /* Grrrr.. It _seems_ that the device-tree is lying on the low bus in pmac_cpufreq_init_MacRISC3()
512 * speed in pmac_cpufreq_init_MacRISC3()
522 * device-tree in pmac_cpufreq_init_MacRISC3()
524 value = of_get_property(cpunode, "min-clock-frequency", NULL); in pmac_cpufreq_init_MacRISC3()
528 /* The PowerBook G4 12" (PowerBook6,1) has an error in the device-tree in pmac_cpufreq_init_MacRISC3()
533 value = of_get_property(cpunode, "max-clock-frequency", NULL); in pmac_cpufreq_init_MacRISC3()
547 if (!of_property_read_bool(cpunode, "dynamic-power-step")) in pmac_cpufreq_init_7447A()
550 volt_gpio_np = of_find_node_by_name(NULL, "cpu-vcore-select"); in pmac_cpufreq_init_7447A()
555 pr_err("missing cpu-vcore-select gpio\n"); in pmac_cpufreq_init_7447A()
577 if (!of_property_read_bool(cpunode, "dynamic-power-step")) in pmac_cpufreq_init_750FX()
581 value = of_get_property(cpunode, "reduced-clock-frequency", NULL); in pmac_cpufreq_init_750FX()
586 volt_gpio_np = of_find_node_by_name(NULL, "cpu-vcore-select"); in pmac_cpufreq_init_750FX()
603 * - Titanium PowerBook 1Ghz (PMU based, 667Mhz & 1Ghz)
604 * - Titanium PowerBook 800 (PMU based, 667Mhz & 800Mhz)
605 * - Titanium PowerBook 400 (PMU based, 300Mhz & 400Mhz)
606 * - Titanium PowerBook 500 (PMU based, 300Mhz & 500Mhz)
607 * - iBook2 500/600 (PMU based, 400Mhz & 500/600Mhz)
608 * - iBook2 700 (CPU based, 400Mhz & 700Mhz, support low voltage)
609 * - Recent MacRISC3 laptops
610 * - All new machines with 7447A CPUs
626 value = of_get_property(cpunode, "clock-frequency", NULL); in pmac_cpufreq_setup()
633 of_property_read_bool(cpunode, "dynamic-power-step") && in pmac_cpufreq_setup()
662 * they both have 300 MHz as low frequency in pmac_cpufreq_setup()
677 return -ENODEV; in pmac_cpufreq_setup()
684 pr_info("Low: %d Mhz, High: %d Mhz, Boot: %d Mhz\n", in pmac_cpufreq_setup()