Lines Matching +full:idle +full:- +full:wait +full:- +full:delay

1 // SPDX-License-Identifier: GPL-2.0-only
8 * Gregory Clement <gregory.clement@free-electrons.com>
9 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
16 #define pr_fmt(fmt) "mvebu-pmsu: " fmt
20 #include <linux/delay.h>
25 #include <linux/mvebu-pmsu.h>
73 /* PMSU delay registers */
104 { .compatible = "marvell,armada-370-pmsu", },
105 { .compatible = "marvell,armada-370-xp-pmsu", },
106 { .compatible = "marvell,armada-380-pmsu", },
130 u32 code_len = mvebu_boot_wa_end - mvebu_boot_wa_start; in mvebu_setup_boot_addr_wa()
139 return -ENOMEM; in mvebu_setup_boot_addr_wa()
151 sram_virt_base + code_len - 4); in mvebu_setup_boot_addr_wa()
172 ret = -ENOENT; in mvebu_v7_pmsu_init()
176 if (of_device_is_compatible(np, "marvell,armada-370-xp-pmsu")) { in mvebu_v7_pmsu_init()
178 res.start = res.start - PMSU_BASE_OFFSET; in mvebu_v7_pmsu_init()
179 res.end = res.start + PMSU_REG_SIZE - 1; in mvebu_v7_pmsu_init()
183 np->full_name)) { in mvebu_v7_pmsu_init()
185 ret = -EBUSY; in mvebu_v7_pmsu_init()
195 ret = -ENOMEM; in mvebu_v7_pmsu_init()
211 /* Enable L2 & Fabric powerdown in Deep-Idle mode - Fabric */ in mvebu_v7_pmsu_enable_l2_powerdown_onidle()
223 /* No locking is needed because we only access per-CPU registers */
230 return -EINVAL; in mvebu_v7_pmsu_idle_prepare()
233 * Adjust the PMSU configuration to wait for WFI signal, enable in mvebu_v7_pmsu_idle_prepare()
234 * IRQ and FIQ as wakeup events, set wait for snoop queue empty in mvebu_v7_pmsu_idle_prepare()
256 /* Disable snoop disable by HW - SW is taking care of it */ in mvebu_v7_pmsu_idle_prepare()
337 /* No locking is needed because we only access per-CPU registers */
380 if (of_property_read_bool(np, "broken-idle")) { in broken_idle()
381 pr_warn("CPU idle is currently broken: disabling\n"); in broken_idle()
393 np = of_find_compatible_node(NULL, NULL, "marvell,coherency-fabric"); in armada_370_cpuidle_init()
395 return -ENODEV; in armada_370_cpuidle_init()
402 * idle state due to heavy L1/L2 cache cleanup operations in armada_370_cpuidle_init()
415 mvebu_v7_cpuidle_device.name = "cpuidle-armada-370"; in armada_370_cpuidle_init()
428 pr_warn("CPU idle is currently broken on Armada 38x: disabling\n"); in armada_38x_cpuidle_init()
432 "marvell,armada-380-coherency-fabric"); in armada_38x_cpuidle_init()
434 return -ENODEV; in armada_38x_cpuidle_init()
442 "marvell,armada-380-mpcore-soc-ctrl"); in armada_38x_cpuidle_init()
444 return -ENODEV; in armada_38x_cpuidle_init()
455 /* Set up delay */ in armada_38x_cpuidle_init()
464 mvebu_v7_cpuidle_device.name = "cpuidle-armada-38x"; in armada_38x_cpuidle_init()
475 np = of_find_compatible_node(NULL, NULL, "marvell,coherency-fabric"); in armada_xp_cpuidle_init()
477 return -ENODEV; in armada_xp_cpuidle_init()
484 mvebu_v7_cpuidle_device.name = "cpuidle-armada-xp"; in armada_xp_cpuidle_init()
502 * Currently the CPU idle support for Armada 38x is broken, as in mvebu_v7_cpu_pm_init()
503 * the CPU hotplug uses some of the CPU idle functions it is in mvebu_v7_cpu_pm_init()
542 /* Prepare to enter idle */ in mvebu_pmsu_dfs_request_local()
554 /* The fact of entering idle will trigger the DFS transition */ in mvebu_pmsu_dfs_request_local()
558 * We're back from idle, the DFS transition has completed, in mvebu_pmsu_dfs_request_local()
559 * clear the idle wait indication. in mvebu_pmsu_dfs_request_local()
598 return -ETIME; in mvebu_pmsu_dfs_request()