Lines Matching +full:slew +full:- +full:delay +full:- +full:us

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org>
4 * and Markus Demleitner <msdemlei@cl.uni-heidelberg.de>
18 #include <linux/delay.h>
73 * the various frequencies, retrieved from the device-tree
117 u32 slew, done = 0; in g5_vdnap_switch_volt() local
120 slew = (speed_mode == CPUFREQ_LOW) ? 1 : 0; in g5_vdnap_switch_volt()
122 args.u[0].p = &slew; in g5_vdnap_switch_volt()
350 int rc = -ENODEV; in g5_neo2_cpufreq_init()
361 return -ENODEV; in g5_neo2_cpufreq_init()
364 valp = of_get_property(cpunode, "cpu-version", NULL); in g5_neo2_cpufreq_init()
366 DBG("No cpu-version property !\n"); in g5_neo2_cpufreq_init()
375 /* Look for the powertune data in the device-tree */ in g5_neo2_cpufreq_init()
376 g5_pmode_data = of_get_property(cpunode, "power-mode-data",&psize); in g5_neo2_cpufreq_init()
378 DBG("No power-mode-data !\n"); in g5_neo2_cpufreq_init()
381 g5_pmode_max = psize / sizeof(u32) - 1; in g5_neo2_cpufreq_init()
391 ssize = (shdr->len * sizeof(u32)) - sizeof(*shdr); in g5_neo2_cpufreq_init()
409 pfunc_set_vdnap0 = pmf_find_function(root, "set-vdnap0"); in g5_neo2_cpufreq_init()
411 pmf_find_function(root, "slewing-done"); in g5_neo2_cpufreq_init()
427 * From what I see, clock-frequency is always the maximal frequency. in g5_neo2_cpufreq_init()
428 * The current driver can not slew sysclk yet, so we really only deal in g5_neo2_cpufreq_init()
433 valp = of_get_property(cpunode, "clock-frequency", NULL); in g5_neo2_cpufreq_init()
435 return -ENODEV; in g5_neo2_cpufreq_init()
447 * sync (voltage is right for example). Firmware may leave us with in g5_neo2_cpufreq_init()
452 g5_pmode_cur = -1; in g5_neo2_cpufreq_init()
466 * hotplug CPU with a dynamic device-tree ... in g5_neo2_cpufreq_init()
496 rc = -ENODEV; in g5_pm72_cpufreq_init()
501 for_each_node_by_name(hwclock, "i2c-hwclock") { in g5_pm72_cpufreq_init()
503 "hwctrl-location", NULL); in g5_pm72_cpufreq_init()
508 if (!of_property_present(hwclock, "platform-get-frequency")) in g5_pm72_cpufreq_init()
514 rc = -ENODEV; in g5_pm72_cpufreq_init()
522 pmf_find_function(hwclock, "get-frequency"); in g5_pm72_cpufreq_init()
524 pmf_find_function(hwclock, "set-frequency-high"); in g5_pm72_cpufreq_init()
526 pmf_find_function(hwclock, "set-frequency-low"); in g5_pm72_cpufreq_init()
528 pmf_find_function(hwclock, "slewing-done"); in g5_pm72_cpufreq_init()
530 pmf_find_function(hwclock, "set-voltage-high-0"); in g5_pm72_cpufreq_init()
532 pmf_find_function(hwclock, "set-voltage-low-0"); in g5_pm72_cpufreq_init()
534 pmf_find_function(hwclock, "set-voltage-high-1"); in g5_pm72_cpufreq_init()
536 pmf_find_function(hwclock, "set-voltage-low-1"); in g5_pm72_cpufreq_init()
542 rc = -ENODEV; in g5_pm72_cpufreq_init()
560 /* Note: The device tree also contains a "platform-set-values" in g5_pm72_cpufreq_init()
566 /* Get max frequency from device-tree */ in g5_pm72_cpufreq_init()
567 valp = of_get_property(cpunode, "clock-frequency", NULL); in g5_pm72_cpufreq_init()
570 rc = -ENODEV; in g5_pm72_cpufreq_init()
586 rc = -ENODEV; in g5_pm72_cpufreq_init()
597 rc = -ENXIO; in g5_pm72_cpufreq_init()
612 * sync (voltage is right for example). Firmware may leave us with in g5_pm72_cpufreq_init()
617 g5_pmode_cur = -1; in g5_pm72_cpufreq_init()
656 return -ENODEV; in g5_cpufreq_init()