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

Commit d674645f authored by Mao Jinlong's avatar Mao Jinlong Committed by Gerrit - the friendly Code Review server
Browse files

coresight: etm3x: Check fuse status after clearing power down bit



Move check of the fuse behind clearing power down bit action as
ETMCR bit 0 must be cleared before checking any ETM status.

Change-Id: I581b827eb43404413a2dca5299ea42d4233d99b5
Signed-off-by: default avatarMao Jinlong <jinlmao@codeaurora.org>
parent 6618051a
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -712,10 +712,6 @@ static void etm_init_arch_data(void *info)

	CS_UNLOCK(drvdata->base);

	/* check the state of the fuse */
	if (!coresight_authstatus_enabled(drvdata->base))
		goto out;

	/* First dummy read */
	(void)etm_readl(drvdata, ETMPDSR);
	/* Provide power to ETM: ETMPDCR[3] == 1 */
@@ -725,6 +721,11 @@ static void etm_init_arch_data(void *info)
	 * certain registers might be ignored.
	 */
	etm_clr_pwrdwn(drvdata);

	/* check the state of the fuse */
	if (!coresight_authstatus_enabled(drvdata->base))
		goto out;

	/*
	 * Set prog bit. It will be set from reset but this is included to
	 * ensure it is set