Loading Documentation/devicetree/bindings/arm/cpus.txt +1 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,7 @@ nodes to be present and contain the properties described below. "allwinner,sun6i-a31" "allwinner,sun8i-a23" "arm,psci" "psci" "brcm,brahma-b15" "marvell,armada-375-smp" "marvell,armada-380-smp" Loading drivers/cpuidle/lpm-levels.c +26 −0 Original line number Diff line number Diff line Loading @@ -363,6 +363,24 @@ static int lpm_cpu_callback(struct notifier_block *cpu_nb, return NOTIFY_OK; } #ifdef CONFIG_ARM_PSCI static int __init set_cpuidle_ops(void) { int ret = 0, cpu; for_each_possible_cpu(cpu) { ret = arm_cpuidle_init(cpu); if (ret) goto exit; } exit: return ret; } #endif static enum hrtimer_restart lpm_hrtimer_cb(struct hrtimer *h) { return HRTIMER_NORESTART; Loading Loading @@ -1954,6 +1972,14 @@ static int __init lpm_levels_module_init(void) goto fail; } #ifdef CONFIG_ARM_PSCI rc = set_cpuidle_ops(); if (rc) { pr_err("%s(): Failed to set cpuidle ops\n", __func__); goto fail; } #endif fail: return rc; } Loading drivers/firmware/psci.c +12 −1 Original line number Diff line number Diff line Loading @@ -230,6 +230,13 @@ static int __init psci_features(u32 psci_func_id) #ifdef CONFIG_CPU_IDLE static DEFINE_PER_CPU_READ_MOSTLY(u32 *, psci_power_state); #ifdef CONFIG_ARM_PSCI static int psci_cpu_init(struct device_node *cpu_node, int cpu) { return 0; } #endif static int psci_dt_cpu_init_idle(struct device_node *cpu_node, int cpu) { int i, ret, count = 0; Loading Loading @@ -333,10 +340,14 @@ int psci_cpu_suspend_enter(unsigned long state_id) #ifdef CONFIG_ARM static struct cpuidle_ops psci_cpuidle_ops __initdata = { .suspend = psci_cpu_suspend_enter, #ifdef CONFIG_ARM_PSCI .init = psci_cpu_init, #else .init = psci_dt_cpu_init_idle, #endif }; CPUIDLE_METHOD_OF_DECLARE(psci, "arm,psci", &psci_cpuidle_ops); CPUIDLE_METHOD_OF_DECLARE(psci, "psci", &psci_cpuidle_ops); #endif #endif Loading Loading
Documentation/devicetree/bindings/arm/cpus.txt +1 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,7 @@ nodes to be present and contain the properties described below. "allwinner,sun6i-a31" "allwinner,sun8i-a23" "arm,psci" "psci" "brcm,brahma-b15" "marvell,armada-375-smp" "marvell,armada-380-smp" Loading
drivers/cpuidle/lpm-levels.c +26 −0 Original line number Diff line number Diff line Loading @@ -363,6 +363,24 @@ static int lpm_cpu_callback(struct notifier_block *cpu_nb, return NOTIFY_OK; } #ifdef CONFIG_ARM_PSCI static int __init set_cpuidle_ops(void) { int ret = 0, cpu; for_each_possible_cpu(cpu) { ret = arm_cpuidle_init(cpu); if (ret) goto exit; } exit: return ret; } #endif static enum hrtimer_restart lpm_hrtimer_cb(struct hrtimer *h) { return HRTIMER_NORESTART; Loading Loading @@ -1954,6 +1972,14 @@ static int __init lpm_levels_module_init(void) goto fail; } #ifdef CONFIG_ARM_PSCI rc = set_cpuidle_ops(); if (rc) { pr_err("%s(): Failed to set cpuidle ops\n", __func__); goto fail; } #endif fail: return rc; } Loading
drivers/firmware/psci.c +12 −1 Original line number Diff line number Diff line Loading @@ -230,6 +230,13 @@ static int __init psci_features(u32 psci_func_id) #ifdef CONFIG_CPU_IDLE static DEFINE_PER_CPU_READ_MOSTLY(u32 *, psci_power_state); #ifdef CONFIG_ARM_PSCI static int psci_cpu_init(struct device_node *cpu_node, int cpu) { return 0; } #endif static int psci_dt_cpu_init_idle(struct device_node *cpu_node, int cpu) { int i, ret, count = 0; Loading Loading @@ -333,10 +340,14 @@ int psci_cpu_suspend_enter(unsigned long state_id) #ifdef CONFIG_ARM static struct cpuidle_ops psci_cpuidle_ops __initdata = { .suspend = psci_cpu_suspend_enter, #ifdef CONFIG_ARM_PSCI .init = psci_cpu_init, #else .init = psci_dt_cpu_init_idle, #endif }; CPUIDLE_METHOD_OF_DECLARE(psci, "arm,psci", &psci_cpuidle_ops); CPUIDLE_METHOD_OF_DECLARE(psci, "psci", &psci_cpuidle_ops); #endif #endif Loading