Commit 67337e8d authored by Suzuki K Poulose's avatar Suzuki K Poulose Committed by Greg Kroah-Hartman

coresight: Add better messages for coresight_timeout

When we encounter a timeout waiting for a status change via
coresight_timeout, the caller always print the offset which
was tried. This is pretty much useless as it doesn't specify
the bit position we wait for. Also, one needs to lookup the
TRM to figure out, what was wrong. This patch changes all
such error messages to print something more meaningful.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1c9cbe11
...@@ -184,8 +184,7 @@ static void etb_disable_hw(struct etb_drvdata *drvdata) ...@@ -184,8 +184,7 @@ static void etb_disable_hw(struct etb_drvdata *drvdata)
if (coresight_timeout(drvdata->base, ETB_FFCR, ETB_FFCR_BIT, 0)) { if (coresight_timeout(drvdata->base, ETB_FFCR, ETB_FFCR_BIT, 0)) {
dev_err(drvdata->dev, dev_err(drvdata->dev,
"timeout observed when probing at offset %#x\n", "timeout while waiting for completion of Manual Flush\n");
ETB_FFCR);
} }
/* disable trace capture */ /* disable trace capture */
...@@ -193,8 +192,7 @@ static void etb_disable_hw(struct etb_drvdata *drvdata) ...@@ -193,8 +192,7 @@ static void etb_disable_hw(struct etb_drvdata *drvdata)
if (coresight_timeout(drvdata->base, ETB_FFSR, ETB_FFSR_BIT, 1)) { if (coresight_timeout(drvdata->base, ETB_FFSR, ETB_FFSR_BIT, 1)) {
dev_err(drvdata->dev, dev_err(drvdata->dev,
"timeout observed when probing at offset %#x\n", "timeout while waiting for Formatter to Stop\n");
ETB_FFCR);
} }
CS_LOCK(drvdata->base); CS_LOCK(drvdata->base);
......
...@@ -99,8 +99,7 @@ static void etm4_enable_hw(void *info) ...@@ -99,8 +99,7 @@ static void etm4_enable_hw(void *info)
/* wait for TRCSTATR.IDLE to go up */ /* wait for TRCSTATR.IDLE to go up */
if (coresight_timeout(drvdata->base, TRCSTATR, TRCSTATR_IDLE_BIT, 1)) if (coresight_timeout(drvdata->base, TRCSTATR, TRCSTATR_IDLE_BIT, 1))
dev_err(drvdata->dev, dev_err(drvdata->dev,
"timeout observed when probing at offset %#x\n", "timeout while waiting for Idle Trace Status\n");
TRCSTATR);
writel_relaxed(config->pe_sel, drvdata->base + TRCPROCSELR); writel_relaxed(config->pe_sel, drvdata->base + TRCPROCSELR);
writel_relaxed(config->cfg, drvdata->base + TRCCONFIGR); writel_relaxed(config->cfg, drvdata->base + TRCCONFIGR);
...@@ -172,8 +171,7 @@ static void etm4_enable_hw(void *info) ...@@ -172,8 +171,7 @@ static void etm4_enable_hw(void *info)
/* wait for TRCSTATR.IDLE to go back down to '0' */ /* wait for TRCSTATR.IDLE to go back down to '0' */
if (coresight_timeout(drvdata->base, TRCSTATR, TRCSTATR_IDLE_BIT, 0)) if (coresight_timeout(drvdata->base, TRCSTATR, TRCSTATR_IDLE_BIT, 0))
dev_err(drvdata->dev, dev_err(drvdata->dev,
"timeout observed when probing at offset %#x\n", "timeout while waiting for Idle Trace Status\n");
TRCSTATR);
CS_LOCK(drvdata->base); CS_LOCK(drvdata->base);
......
...@@ -38,8 +38,7 @@ void tmc_wait_for_tmcready(struct tmc_drvdata *drvdata) ...@@ -38,8 +38,7 @@ void tmc_wait_for_tmcready(struct tmc_drvdata *drvdata)
if (coresight_timeout(drvdata->base, if (coresight_timeout(drvdata->base,
TMC_STS, TMC_STS_TMCREADY_BIT, 1)) { TMC_STS, TMC_STS_TMCREADY_BIT, 1)) {
dev_err(drvdata->dev, dev_err(drvdata->dev,
"timeout observed when probing at offset %#x\n", "timeout while waiting for TMC to be Ready\n");
TMC_STS);
} }
} }
...@@ -56,8 +55,7 @@ void tmc_flush_and_stop(struct tmc_drvdata *drvdata) ...@@ -56,8 +55,7 @@ void tmc_flush_and_stop(struct tmc_drvdata *drvdata)
if (coresight_timeout(drvdata->base, if (coresight_timeout(drvdata->base,
TMC_FFCR, TMC_FFCR_FLUSHMAN_BIT, 0)) { TMC_FFCR, TMC_FFCR_FLUSHMAN_BIT, 0)) {
dev_err(drvdata->dev, dev_err(drvdata->dev,
"timeout observed when probing at offset %#x\n", "timeout while waiting for completion of Manual Flush\n");
TMC_FFCR);
} }
tmc_wait_for_tmcready(drvdata); tmc_wait_for_tmcready(drvdata);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment