Loading Documentation/devicetree/bindings/arm/msm/lpm-levels.txt +2 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,8 @@ qcom,pm-cpu-levels. - qcom,psci-mode-mask: Same as cluster level fields. - qcom,psci-cpu-mode: ID to be passed into PSCI firmware. - qcom,cpu-is-reset: Whether CPU get reset are not. - qcom,jtag-save-restore: A boolean specifying jtag registers save and restore required are not. [Example dts] Loading arch/arm/boot/dts/qcom/msm8996-v1.dtsi +20 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,26 @@ qcom,cnss { status = "disabled"; }; qcom,lpm-levels { qcom,pm-cluster@0 { qcom,pm-cluster@0{ qcom,pm-cpu { qcom,pm-cpu-level@1 { /* C4 */ qcom,jtag-save-restore; }; }; }; qcom,pm-cluster@1{ qcom,pm-cpu { qcom,pm-cpu-level@1 { /* C4 */ qcom,jtag-save-restore; }; }; }; }; }; }; &mdss_dsi0_pll { Loading arch/arm/boot/dts/qcom/msm8996-v2.dtsi +20 −0 Original line number Diff line number Diff line Loading @@ -333,6 +333,26 @@ clock-names = "core_clk"; qcom,use-dma-zone; }; qcom,lpm-levels { qcom,pm-cluster@0 { qcom,pm-cluster@0{ qcom,pm-cpu { qcom,pm-cpu-level@1 { /* C4 */ qcom,jtag-save-restore; }; }; }; qcom,pm-cluster@1{ qcom,pm-cpu { qcom,pm-cpu-level@1 { /* C4 */ qcom,jtag-save-restore; }; }; }; }; }; }; &tsens0 { Loading drivers/cpuidle/lpm-levels-of.c +3 −0 Original line number Diff line number Diff line Loading @@ -640,6 +640,9 @@ static int parse_cpu_levels(struct device_node *node, struct lpm_cluster *c) key = "qcom,cpu-is-reset"; l->is_reset = of_property_read_bool(n, key); key = "qcom,jtag-save-restore"; l->jtag_save_restore = of_property_read_bool(n, key); } return 0; failed: Loading drivers/cpuidle/lpm-levels.c +17 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ #include <soc/qcom/rpm-notifier.h> #include <soc/qcom/event_timer.h> #include <soc/qcom/lpm-stats.h> #include <soc/qcom/jtag.h> #include <asm/cputype.h> #include <asm/arch_timer.h> #include <asm/cacheflush.h> Loading Loading @@ -685,6 +686,8 @@ static inline void cpu_prepare(struct lpm_cluster *cluster, int cpu_index, { struct lpm_cpu_level *cpu_level = &cluster->cpu->levels[cpu_index]; unsigned int cpu = raw_smp_processor_id(); bool jtag_save_restore = cluster->cpu->levels[cpu_index].jtag_save_restore; /* Use broadcast timer for aggregating sleep mode within a cluster. * A broadcast timer could be used in the following scenarios Loading @@ -705,6 +708,12 @@ static inline void cpu_prepare(struct lpm_cluster *cluster, int cpu_index, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE) || (cpu_level->is_reset))) cpu_pm_enter(); /* * Save JTAG registers for 8996v1.0 & 8996v2.x in C4 LPM */ if (jtag_save_restore) msm_jtag_save_state(); } static inline void cpu_unprepare(struct lpm_cluster *cluster, int cpu_index, Loading @@ -712,6 +721,8 @@ static inline void cpu_unprepare(struct lpm_cluster *cluster, int cpu_index, { struct lpm_cpu_level *cpu_level = &cluster->cpu->levels[cpu_index]; unsigned int cpu = raw_smp_processor_id(); bool jtag_save_restore = cluster->cpu->levels[cpu_index].jtag_save_restore; if (from_idle && (cpu_level->use_bc_timer || (cpu_index >= cluster->min_child_level))) Loading @@ -722,6 +733,12 @@ static inline void cpu_unprepare(struct lpm_cluster *cluster, int cpu_index, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE) || cpu_level->is_reset)) cpu_pm_exit(); /* * Restore JTAG registers for 8996v1.0 & 8996v2.x in C4 LPM */ if (jtag_save_restore) msm_jtag_restore_state(); } int get_cluster_id(struct lpm_cluster *cluster, int *aff_lvl) Loading Loading
Documentation/devicetree/bindings/arm/msm/lpm-levels.txt +2 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,8 @@ qcom,pm-cpu-levels. - qcom,psci-mode-mask: Same as cluster level fields. - qcom,psci-cpu-mode: ID to be passed into PSCI firmware. - qcom,cpu-is-reset: Whether CPU get reset are not. - qcom,jtag-save-restore: A boolean specifying jtag registers save and restore required are not. [Example dts] Loading
arch/arm/boot/dts/qcom/msm8996-v1.dtsi +20 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,26 @@ qcom,cnss { status = "disabled"; }; qcom,lpm-levels { qcom,pm-cluster@0 { qcom,pm-cluster@0{ qcom,pm-cpu { qcom,pm-cpu-level@1 { /* C4 */ qcom,jtag-save-restore; }; }; }; qcom,pm-cluster@1{ qcom,pm-cpu { qcom,pm-cpu-level@1 { /* C4 */ qcom,jtag-save-restore; }; }; }; }; }; }; &mdss_dsi0_pll { Loading
arch/arm/boot/dts/qcom/msm8996-v2.dtsi +20 −0 Original line number Diff line number Diff line Loading @@ -333,6 +333,26 @@ clock-names = "core_clk"; qcom,use-dma-zone; }; qcom,lpm-levels { qcom,pm-cluster@0 { qcom,pm-cluster@0{ qcom,pm-cpu { qcom,pm-cpu-level@1 { /* C4 */ qcom,jtag-save-restore; }; }; }; qcom,pm-cluster@1{ qcom,pm-cpu { qcom,pm-cpu-level@1 { /* C4 */ qcom,jtag-save-restore; }; }; }; }; }; }; &tsens0 { Loading
drivers/cpuidle/lpm-levels-of.c +3 −0 Original line number Diff line number Diff line Loading @@ -640,6 +640,9 @@ static int parse_cpu_levels(struct device_node *node, struct lpm_cluster *c) key = "qcom,cpu-is-reset"; l->is_reset = of_property_read_bool(n, key); key = "qcom,jtag-save-restore"; l->jtag_save_restore = of_property_read_bool(n, key); } return 0; failed: Loading
drivers/cpuidle/lpm-levels.c +17 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ #include <soc/qcom/rpm-notifier.h> #include <soc/qcom/event_timer.h> #include <soc/qcom/lpm-stats.h> #include <soc/qcom/jtag.h> #include <asm/cputype.h> #include <asm/arch_timer.h> #include <asm/cacheflush.h> Loading Loading @@ -685,6 +686,8 @@ static inline void cpu_prepare(struct lpm_cluster *cluster, int cpu_index, { struct lpm_cpu_level *cpu_level = &cluster->cpu->levels[cpu_index]; unsigned int cpu = raw_smp_processor_id(); bool jtag_save_restore = cluster->cpu->levels[cpu_index].jtag_save_restore; /* Use broadcast timer for aggregating sleep mode within a cluster. * A broadcast timer could be used in the following scenarios Loading @@ -705,6 +708,12 @@ static inline void cpu_prepare(struct lpm_cluster *cluster, int cpu_index, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE) || (cpu_level->is_reset))) cpu_pm_enter(); /* * Save JTAG registers for 8996v1.0 & 8996v2.x in C4 LPM */ if (jtag_save_restore) msm_jtag_save_state(); } static inline void cpu_unprepare(struct lpm_cluster *cluster, int cpu_index, Loading @@ -712,6 +721,8 @@ static inline void cpu_unprepare(struct lpm_cluster *cluster, int cpu_index, { struct lpm_cpu_level *cpu_level = &cluster->cpu->levels[cpu_index]; unsigned int cpu = raw_smp_processor_id(); bool jtag_save_restore = cluster->cpu->levels[cpu_index].jtag_save_restore; if (from_idle && (cpu_level->use_bc_timer || (cpu_index >= cluster->min_child_level))) Loading @@ -722,6 +733,12 @@ static inline void cpu_unprepare(struct lpm_cluster *cluster, int cpu_index, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE) || cpu_level->is_reset)) cpu_pm_exit(); /* * Restore JTAG registers for 8996v1.0 & 8996v2.x in C4 LPM */ if (jtag_save_restore) msm_jtag_restore_state(); } int get_cluster_id(struct lpm_cluster *cluster, int *aff_lvl) Loading