summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-07-27 19:26:41 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-07-27 19:26:40 -0700
commit6ae89be87e63fd18dce253bb201ee062628f7333 (patch)
treec34d47fd5b363862ce91521dfaac426c89262fee
parent354d219f20c24658cd553216ce282438736f6741 (diff)
parent8624f4eca5cb0bbd3869255d37849ee5f69d0078 (diff)
Merge "coresight-etm4x: avoid reading trace-id from ETM hardware block"
-rw-r--r--drivers/hwtracing/coresight/coresight-etm4x.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c
index 7e93f7654347..617c766f032e 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x.c
@@ -68,24 +68,8 @@ static bool etm4_arch_supported(u8 arch)
static int etm4_trace_id(struct coresight_device *csdev)
{
struct etmv4_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
- unsigned long flags;
- int trace_id = -1;
- if (!drvdata->enable)
- return drvdata->trcid;
-
- pm_runtime_get_sync(drvdata->dev);
- spin_lock_irqsave(&drvdata->spinlock, flags);
-
- CS_UNLOCK(drvdata->base);
- trace_id = readl_relaxed(drvdata->base + TRCTRACEIDR);
- trace_id &= ETM_TRACEID_MASK;
- CS_LOCK(drvdata->base);
-
- spin_unlock_irqrestore(&drvdata->spinlock, flags);
- pm_runtime_put(drvdata->dev);
-
- return trace_id;
+ return drvdata->trcid;
}
static void etm4_enable_hw(void *info)