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"
35 struct genpd_power_state *state = &pd->states[pd->state_idx]; in psci_pd_power_off()
38 if (!state->data) in psci_pd_power_off()
42 return -EBUSY; in psci_pd_power_off()
44 /* OSI mode is enabled, set the corresponding domain state. */ in psci_pd_power_off()
45 pd_state = state->data; in psci_pd_power_off()
56 int ret = -ENOMEM; in psci_pd_init()
66 pd->flags |= GENPD_FLAG_IRQ_SAFE | GENPD_FLAG_CPU_DOMAIN; in psci_pd_init()
70 * On a PREEMPT_RT based configuration the domain idle states are in psci_pd_init()
71 * supported, but only during system-wide suspend. in psci_pd_init()
74 pd->power_off = psci_pd_power_off; in psci_pd_init()
76 pd->flags |= GENPD_FLAG_RPM_ALWAYS_ON; in psci_pd_init()
78 pd->flags |= GENPD_FLAG_ALWAYS_ON; in psci_pd_init()
81 /* Use governor for CPU PM domains if it has some states to manage. */ in psci_pd_init()
82 pd_gov = pd->states ? &pm_domain_cpu_gov : NULL; in psci_pd_init()
92 pd_provider->node = of_node_get(np); in psci_pd_init()
93 list_add(&pd_provider->link, &psci_pd_providers); in psci_pd_init()
95 pr_debug("init PM domain %s\n", pd->name); in psci_pd_init()
105 pr_err("failed to init PM domain ret=%d %pOF\n", ret, np); in psci_pd_init()
116 of_genpd_del_provider(pd_provider->node); in psci_pd_remove()
118 genpd = of_genpd_remove_last(pd_provider->node); in psci_pd_remove()
122 of_node_put(pd_provider->node); in psci_pd_remove()
123 list_del(&pd_provider->link); in psci_pd_remove()
131 * All devices have now been attached/probed to the PM domain topology, in psci_cpuidle_domain_sync_state()
132 * hence it's fine to allow domain states to be picked. in psci_cpuidle_domain_sync_state()
138 { .compatible = "arm,psci-1.0" },
144 struct device_node *np = pdev->dev.of_node; in psci_cpuidle_domain_probe()
149 return -ENODEV; in psci_cpuidle_domain_probe()
152 * Parse child nodes for the "#power-domain-cells" property and in psci_cpuidle_domain_probe()
153 * initialize a genpd/genpd-of-provider pair when it's found. in psci_cpuidle_domain_probe()
156 if (!of_property_present(node, "#power-domain-cells")) in psci_cpuidle_domain_probe()
180 pr_info("Initialized CPU PM domain topology using %s mode\n", in psci_cpuidle_domain_probe()
195 .name = "psci-cpuidle-domain",