Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77619641 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Define jtag save restore flag for 8996"

parents 3d29f835 63b5a3e1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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]

+20 −0
Original line number Diff line number Diff line
@@ -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 {
+20 −0
Original line number Diff line number Diff line
@@ -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 {
+3 −0
Original line number Diff line number Diff line
@@ -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:
+17 −0
Original line number Diff line number Diff line
@@ -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>
@@ -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
@@ -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,
@@ -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)))
@@ -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