Merge "coresight-etm4x: avoid reading trace-id from ETM hardware block"
This commit is contained in:
commit
6ae89be87e
1 changed files with 1 additions and 17 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue