Lines Matching +full:idle +full:- +full:wait +full:- +full:delay
7 * Gregory Clement <gregory.clement@free-electrons.com>
8 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
19 #define pr_fmt(fmt) "mvebu-pmsu: " fmt
23 #include <linux/delay.h>
28 #include <linux/mvebu-pmsu.h>
76 /* PMSU delay registers */
107 { .compatible = "marvell,armada-370-pmsu", },
108 { .compatible = "marvell,armada-370-xp-pmsu", },
109 { .compatible = "marvell,armada-380-pmsu", },
133 u32 code_len = mvebu_boot_wa_end - mvebu_boot_wa_start; in mvebu_setup_boot_addr_wa()
142 return -ENOMEM; in mvebu_setup_boot_addr_wa()
154 sram_virt_base + code_len - 4); in mvebu_setup_boot_addr_wa()
175 ret = -ENOENT; in mvebu_v7_pmsu_init()
179 if (of_device_is_compatible(np, "marvell,armada-370-xp-pmsu")) { in mvebu_v7_pmsu_init()
181 res.start = res.start - PMSU_BASE_OFFSET; in mvebu_v7_pmsu_init()
182 res.end = res.start + PMSU_REG_SIZE - 1; in mvebu_v7_pmsu_init()
186 np->full_name)) { in mvebu_v7_pmsu_init()
188 ret = -EBUSY; in mvebu_v7_pmsu_init()
198 ret = -ENOMEM; in mvebu_v7_pmsu_init()
214 /* Enable L2 & Fabric powerdown in Deep-Idle mode - Fabric */ in mvebu_v7_pmsu_enable_l2_powerdown_onidle()
226 /* No locking is needed because we only access per-CPU registers */
233 return -EINVAL; in mvebu_v7_pmsu_idle_prepare()
236 * Adjust the PMSU configuration to wait for WFI signal, enable in mvebu_v7_pmsu_idle_prepare()
237 * IRQ and FIQ as wakeup events, set wait for snoop queue empty in mvebu_v7_pmsu_idle_prepare()
259 /* Disable snoop disable by HW - SW is taking care of it */ in mvebu_v7_pmsu_idle_prepare()
340 /* No locking is needed because we only access per-CPU registers */
383 if (of_property_read_bool(np, "broken-idle")) { in broken_idle()
384 pr_warn("CPU idle is currently broken: disabling\n"); in broken_idle()
396 np = of_find_compatible_node(NULL, NULL, "marvell,coherency-fabric"); in armada_370_cpuidle_init()
398 return -ENODEV; in armada_370_cpuidle_init()
405 * idle state due to heavy L1/L2 cache cleanup operations in armada_370_cpuidle_init()
418 mvebu_v7_cpuidle_device.name = "cpuidle-armada-370"; in armada_370_cpuidle_init()
431 pr_warn("CPU idle is currently broken on Armada 38x: disabling\n"); in armada_38x_cpuidle_init()
435 "marvell,armada-380-coherency-fabric"); in armada_38x_cpuidle_init()
437 return -ENODEV; in armada_38x_cpuidle_init()
445 "marvell,armada-380-mpcore-soc-ctrl"); in armada_38x_cpuidle_init()
447 return -ENODEV; in armada_38x_cpuidle_init()
458 /* Set up delay */ in armada_38x_cpuidle_init()
467 mvebu_v7_cpuidle_device.name = "cpuidle-armada-38x"; in armada_38x_cpuidle_init()
478 np = of_find_compatible_node(NULL, NULL, "marvell,coherency-fabric"); in armada_xp_cpuidle_init()
480 return -ENODEV; in armada_xp_cpuidle_init()
487 mvebu_v7_cpuidle_device.name = "cpuidle-armada-xp"; in armada_xp_cpuidle_init()
505 * Currently the CPU idle support for Armada 38x is broken, as in mvebu_v7_cpu_pm_init()
506 * the CPU hotplug uses some of the CPU idle functions it is in mvebu_v7_cpu_pm_init()
545 /* Prepare to enter idle */ in mvebu_pmsu_dfs_request_local()
557 /* The fact of entering idle will trigger the DFS transition */ in mvebu_pmsu_dfs_request_local()
561 * We're back from idle, the DFS transition has completed, in mvebu_pmsu_dfs_request_local()
562 * clear the idle wait indication. in mvebu_pmsu_dfs_request_local()
601 return -ETIME; in mvebu_pmsu_dfs_request()