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

Commit 0b32966c authored by Deepak Katragadda's avatar Deepak Katragadda
Browse files

clk: qcom: clk-cpu-osm: Update logic to check if OSMs been enabled in TZ



On SDM845v2, the OSM_ENABLE register has a new WDOG_DEBUG_EN bit
that's set by default. This breaks the logic in the OSM driver
code which assumes that the ENABLE_OSM bit is the only one that's
set in that register. Fix this.

Change-Id: I5c7925aa248f34f3308259446708b262f4a80f4a
Signed-off-by: default avatarDeepak Katragadda <dkatraga@codeaurora.org>
parent 089d1cb5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@
#define PERFCL_EFUSE_MASK		0x7

#define ENABLE_REG			0x0
#define ENABLE_OSM			BIT(0)
#define FREQ_REG			0x110
#define VOLT_REG			0x114
#define OVERRIDE_REG			0x118
@@ -2629,7 +2630,7 @@ static int clk_osm_resources_init(struct platform_device *pdev)
	}

	/* Check if OSM has been enabled already by trustzone.  */
	if (readl_relaxed(l3_clk.vbases[OSM_BASE] + ENABLE_REG)) {
	if (readl_relaxed(l3_clk.vbases[OSM_BASE] + ENABLE_REG) & ENABLE_OSM) {
		dev_info(&pdev->dev, "OSM has been initialized and enabled by TZ software\n");
		osm_tz_enabled = true;
	}