Lines Matching +full:domain +full:- +full:idle +full:- +full:states

1 // SPDX-License-Identifier: GPL-2.0
3 * PM domains for CPUs via genpd - managed by cpuidle-psci.
22 #include "cpuidle-psci.h"
34 struct genpd_power_state *state = &pd->states[pd->state_idx]; in psci_pd_power_off()
37 if (!state->data) in psci_pd_power_off()
41 return -EBUSY; in psci_pd_power_off()
43 /* OSI mode is enabled, set the corresponding domain state. */ in psci_pd_power_off()
44 pd_state = state->data; in psci_pd_power_off()
55 int ret = -ENOMEM; in psci_pd_init()
65 pd->flags |= GENPD_FLAG_IRQ_SAFE | GENPD_FLAG_CPU_DOMAIN; in psci_pd_init()
69 * PREEMPT_RT is not yet ready to enter domain idle states. in psci_pd_init()
72 pd->power_off = psci_pd_power_off; in psci_pd_init()
74 pd->flags |= GENPD_FLAG_ALWAYS_ON; in psci_pd_init()
76 /* Use governor for CPU PM domains if it has some states to manage. */ in psci_pd_init()
77 pd_gov = pd->states ? &pm_domain_cpu_gov : NULL; in psci_pd_init()
87 pd_provider->node = of_node_get(np); in psci_pd_init()
88 list_add(&pd_provider->link, &psci_pd_providers); in psci_pd_init()
90 pr_debug("init PM domain %s\n", pd->name); in psci_pd_init()
100 pr_err("failed to init PM domain ret=%d %pOF\n", ret, np); in psci_pd_init()
111 of_genpd_del_provider(pd_provider->node); in psci_pd_remove()
113 genpd = of_genpd_remove_last(pd_provider->node); in psci_pd_remove()
117 of_node_put(pd_provider->node); in psci_pd_remove()
118 list_del(&pd_provider->link); in psci_pd_remove()
126 * All devices have now been attached/probed to the PM domain topology, in psci_cpuidle_domain_sync_state()
127 * hence it's fine to allow domain states to be picked. in psci_cpuidle_domain_sync_state()
133 { .compatible = "arm,psci-1.0" },
139 struct device_node *np = pdev->dev.of_node; in psci_cpuidle_domain_probe()
145 return -ENODEV; in psci_cpuidle_domain_probe()
148 * Parse child nodes for the "#power-domain-cells" property and in psci_cpuidle_domain_probe()
149 * initialize a genpd/genpd-of-provider pair when it's found. in psci_cpuidle_domain_probe()
152 if (!of_property_present(node, "#power-domain-cells")) in psci_cpuidle_domain_probe()
178 pr_info("Initialized CPU PM domain topology using %s mode\n", in psci_cpuidle_domain_probe()
193 .name = "psci-cpuidle-domain",