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

Commit 31a66f32 authored by Osvaldo Banuelos's avatar Osvaldo Banuelos
Browse files

clk: msm: clock-osm: don't use version register to enable WDOG status



The hardware version register does not return the expected
version value. The register is located in register space that is
accessible to the secure world only. This results in WDOG status
register not being enabled. Use the chip version instead.

CRs-Fixed: 1099112
Change-Id: I014c823bcf2545f005205dde326a074eaa5d7a6a
Signed-off-by: default avatarOsvaldo Banuelos <osvaldob@codeaurora.org>
parent 368fecd7
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -81,7 +81,6 @@ enum clk_osm_trace_packet_id {
#define MEM_ACC_SEQ_REG_VAL_START(n) (SEQ_REG(60 + (n)))
#define SEQ_REG1_MSM8998_V2 0x1048
#define VERSION_REG 0x0
#define VERSION_1P1 0x00010100

#define OSM_TABLE_SIZE 40
#define MAX_CLUSTER_CNT 2
@@ -353,7 +352,6 @@ struct clk_osm {
	unsigned long pbases[NUM_BASES];
	spinlock_t lock;

	u32 version;
	u32 cpu_reg_mask;
	u32 num_entries;
	u32 cluster_num;
@@ -2569,7 +2567,7 @@ static int debugfs_set_wdog_trace(void *data, u64 val)
	struct clk_osm *c = data;
	int regval;

	if (c->version >= VERSION_1P1) {
	if (msm8998_v2) {
		regval = clk_osm_read_reg(c, TRACE_CTRL);
		regval = val ? regval | TRACE_CTRL_ENABLE_WDOG_STATUS :
			regval & ~TRACE_CTRL_ENABLE_WDOG_STATUS;
@@ -3360,9 +3358,6 @@ static int cpu_clock_osm_driver_probe(struct platform_device *pdev)
		goto exit2;
	}

	pwrcl_clk.version = clk_osm_read_reg(&pwrcl_clk, VERSION_REG);
	perfcl_clk.version = clk_osm_read_reg(&perfcl_clk, VERSION_REG);

	populate_opp_table(pdev);
	populate_debugfs_dir(&pwrcl_clk);
	populate_debugfs_dir(&perfcl_clk);