coresight: trbe: Unify the enabling sequence
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 14 Sep 2021 10:26:39 +0000 (11:26 +0100)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 27 Oct 2021 17:45:25 +0000 (11:45 -0600)
commit04a37a174e5697d90c129c286bdb6bbcb516058f
treebfc6cd929ad8cc53b20e0d1fac91941cba8be129
parentacee3ef86d5cfda094fa9806935aee45833444e3
coresight: trbe: Unify the enabling sequence

Unify the sequence of enabling the TRBE. We do this from
event_start and also from the TRBE IRQ handler. Lets move
this to a common helper. The only minor functional change
is returning an error when we fail to enable the TRBE.
This should be handled already.

Since we now have unique entry point to trying to enable TRBE,
move the format flag setting to the central place.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20210914102641.1852544-9-suzuki.poulose@arm.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/hwtracing/coresight/coresight-trbe.c